Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] support signal handling in AWS batch #17

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nh13
Copy link
Member

@nh13 nh13 commented Jun 18, 2020

Allows the run-job tool cancel or terminate the job after submission.

The batch API now also supports the above during job creation.

Allows the `run-job` tool cancel or terminate the job after submission.

The batch API now also supports the above during job creation.
for code in self.terminate_on:
signal.signal(
code, lambda signum, frame: self.terminate_job(reason=f"Interrupted: {code}")
)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this needs a unit test probably. Make a sub-process, then check that it terminates?

@codecov-commenter
Copy link

Codecov Report

Merging #17 into master will decrease coverage by 1.5%.
The diff coverage is 37.5%.

@@           Coverage Diff            @@
##           master     #17     +/-   ##
========================================
- Coverage    77.4%   75.9%   -1.6%     
========================================
  Files          11      11             
  Lines         439     453     +14     
  Branches       45      51      +6     
========================================
+ Hits          340     344      +4     
- Misses         88      96      +8     
- Partials       11      13      +2     

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants