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

Job feature: kill child events jobs if parent job terminates with an error #25

Open
athob opened this issue Sep 5, 2020 · 0 comments
Open
Assignees
Labels
enhancement New feature or request

Comments

@athob
Copy link
Collaborator

athob commented Sep 5, 2020

The instance method _ending_todo of a Job object handles the exiting procedure, whether or not the Job completed or exited with an error.

WINGS/src/wpipe/Job.py

Lines 512 to 519 in e3d7519

def _ending_todo(self):
if hasattr(sys, "last_value"):
self.state = repr(sys.last_value)
else:
self.state = JOBCOMPSTATE
self._job.endtime = datetime.datetime.utcnow()
self._job.timestamp = datetime.datetime.utcnow()
si.commit()

In the latter case, it only updates the state column in the database to reflect the type of error encountered. Additionally, it should also force-terminates the jobs of any child event it generated and fired.

@athob athob added the enhancement New feature or request label Sep 5, 2020
@athob athob self-assigned this Sep 5, 2020
@athob athob changed the title Job features: kill child events jobs if parent job terminates with an error Job feature: kill child events jobs if parent job terminates with an error Sep 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant