Skip to content

Commit

Permalink
Removes conditional task retrieval
Browse files Browse the repository at this point in the history
  • Loading branch information
dyld-w committed Oct 31, 2024
1 parent ba549e6 commit 7c69e69
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,9 @@
resource_add_path(WRK_DIR)

retrieved_worker_id = retrieve_worker_id()
tasks_from_api = {'status': 'pending', 'content': ''}
number_of_tasks = 0

# Proceed if a valid worker ID is retrieved and it's not a placeholder
if retrieved_worker_id['status'] == 'success' and retrieved_worker_id['content'] != CogBatt_config.WORKER_ID_PLACEHOLDER_VALUE:
tasks_from_api = get_blocks_to_run(retrieved_worker_id['content'])
number_of_tasks = 0 if tasks_from_api['status'] == 'error' else len(tasks_from_api['content'])
tasks_from_api = get_blocks_to_run(retrieved_worker_id['content'])
number_of_tasks = 0 if tasks_from_api['status'] == 'error' else len(tasks_from_api['content'])


# Initialize the SMILE experiment.
Expand Down

0 comments on commit 7c69e69

Please sign in to comment.