From 89881f293ef9510a48a3064e2f4807399455c9f6 Mon Sep 17 00:00:00 2001 From: Naor Livne Date: Mon, 14 Jan 2019 13:53:33 +0200 Subject: [PATCH] edge case protection against starting a worker as part of a device_group that does not exist yet --- worker.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/worker.py b/worker.py index d98bc10..5c839ea 100644 --- a/worker.py +++ b/worker.py @@ -253,7 +253,8 @@ def get_device_group_info(nebula_connection_object, device_group_to_get_info): while local_device_group_info["status_code"] == 403 and \ local_device_group_info["reply"]["device_group_exists"] is False: print("device_group " + device_group + " doesn't exist in nebula cluster, waiting for it to be created") - time.sleep(5) + local_device_group_info = get_device_group_info(nebula_connection, device_group) + time.sleep(nebula_manager_check_in_time) # start all apps that are set to running on boot for nebula_app in local_device_group_info["reply"]["apps"]: