Skip to content
Snippets Groups Projects
Unverified Commit 8a255df1 authored by REIG Julien's avatar REIG Julien
Browse files

fix empty queue

parent b36f4a59
Branches
No related tags found
1 merge request!16Node knowledge
......@@ -15,6 +15,8 @@ def fetch_insert_resource_queue(intern_node_address: str):
Fetches the resources from the queue and inserts them into the database
"""
resources = get_resource_queue(intern_node_address, True)
if (resources is None):
return
for resource in resources:
insert_resource(resource)
......@@ -23,6 +25,8 @@ def fetch_insert_command_queue(intern_node_address: str):
Fetches the commands from the queue and inserts them into the database
"""
commands = get_command_queue(intern_node_address, True)
if (commands is None):
return
for command in commands:
resource_id = command['resource_id']
cm = command['command']
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment