Skip to content

Commit

Permalink
edge case protection against starting a worker as part of a device_gr…
Browse files Browse the repository at this point in the history
…oup that does not exist yet
  • Loading branch information
Naor Livne committed Jan 14, 2019
1 parent 5f38150 commit 89881f2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]:
Expand Down

0 comments on commit 89881f2

Please sign in to comment.