Skip to content

Commit

Permalink
Have termination not raise asyncio.CancellationError for every real
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan-eq committed Nov 25, 2024
1 parent 4de22d3 commit ce86ea6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/_ert/forward_model_runner/job_dispatch.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import asyncio
import contextlib
import os
import signal
import sys
Expand All @@ -14,7 +15,8 @@ def sigterm_handler(_signo, _stack_frame):
def main():
os.nice(19)
signal.signal(signal.SIGTERM, sigterm_handler)
asyncio.run(job_runner_main(sys.argv))
with contextlib.suppress(asyncio.CancelledError):
asyncio.run(job_runner_main(sys.argv))


if __name__ == "__main__":
Expand Down

0 comments on commit ce86ea6

Please sign in to comment.