Skip to content
Snippets Groups Projects

Execute docker tasks in RQ

Merged Valentin Rigal requested to merge dummy-tasks into community
1 file
+ 0
2
Compare changes
  • Side-by-side
  • Inline
+ 0
2
@@ -115,9 +115,7 @@ def run_docker_task(client, task, temp_dir):
if task.command is not None:
kwargs["command"] = task.command
container = client.containers.run(task.image, **kwargs)
# Wait for
while container.status == "created":
sleep(TASK_DOCKER_POLLING)
container.reload()
if container.status != "running":
raise Exception("Container was not updated to state running")
Loading