Skip to content
Snippets Groups Projects
Commit f36c1ed7 authored by Christopher Spinrath's avatar Christopher Spinrath
Browse files

Implement a poor man's timeout for tasks

parent dff7aecd
No related branches found
No related tags found
No related merge requests found
...@@ -103,7 +103,17 @@ class Task: ...@@ -103,7 +103,17 @@ class Task:
# print(" ".join(args)) # print(" ".join(args))
# print("popd") # print("popd")
subprocess.run(" ".join(args), shell = True, cwd = self._work_dir) try:
subprocess.run(
" ".join(args),
shell = True,
cwd = self._work_dir,
timeout = 3600, # FIXME
)
except subprocess.TimeoutExpired:
print()
print("Task timed out!")
print()
@classmethod @classmethod
def from_dict(cls, data): def from_dict(cls, data):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment