Skip to content

Commit

Permalink
If the cache is empty execute the task again
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-janssen committed Nov 10, 2024
1 parent 24f0571 commit 9efd8a5
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions executorlib/interactive/shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,16 @@ def _execute_task_with_cache(
data_dict["output"] = future.result()
dump(file_name=file_name, data_dict=data_dict)
else:
_, result = get_output(file_name=file_name)
future = task_dict["future"]
future.set_result(result)
future_queue.task_done()
exe_flag, result = get_output(file_name=file_name)
if exe_flag:
future = task_dict["future"]
future.set_result(result)
future_queue.task_done()
else:
_execute_task(
interface=interface,
task_dict=task_dict,
future_queue=future_queue,
)
data_dict["output"] = future.result()
dump(file_name=file_name, data_dict=data_dict)

0 comments on commit 9efd8a5

Please sign in to comment.