Skip to content

Conversation

@BryonLewis
Copy link
Collaborator

Within Girder and girder jobs itself when cancelling a job it calls celery revoke()
Girder Worker code: https://github.com/girder/girder_worker/blob/19b4fc3360a0c9d92fbd0ecd1bfab693f8c75ae7/girder_worker/girder_plugin/event_handlers.py#L142
Celery Reference for Revoke: https://docs.celeryq.dev/en/latest/userguide/workers.html#revoke-revoking-tasks

So it won't execute the task but it doesn't stop the execution of a currently running task.

This update checks in the logger for the Task to see if the task status is CANCELING. If it is it will then kill the subprocess used to run VIAME for both pipelines and training. Without this, the process needs to complete before the resources are released. This should make cancelling a task for training/pipelines actually kill the process itself.

Copy link
Collaborator

@marySalvi marySalvi left a comment

Choose a reason for hiding this comment

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

LGTM

@BryonLewis BryonLewis merged commit 5085640 into main Aug 9, 2023
@BryonLewis BryonLewis deleted the terminate-subprocess branch August 9, 2023 16:28
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