mirror of
https://github.com/ansible/awx.git
synced 2026-04-14 06:29:25 -02:30
Switch to using SIGTERM for canceling a job
This commit is contained in:
@@ -371,7 +371,7 @@ class BaseTask(Task):
|
|||||||
# Refresh model instance from the database (to check cancel flag).
|
# Refresh model instance from the database (to check cancel flag).
|
||||||
instance = self.update_model(instance.pk)
|
instance = self.update_model(instance.pk)
|
||||||
if instance.cancel_flag:
|
if instance.cancel_flag:
|
||||||
os.kill(child.pid, signal.SIGINT)
|
os.kill(child.pid, signal.SIGTERM)
|
||||||
time.sleep(3)
|
time.sleep(3)
|
||||||
# The following line causes orphaned ansible processes
|
# The following line causes orphaned ansible processes
|
||||||
# child.terminate(canceled)
|
# child.terminate(canceled)
|
||||||
|
|||||||
Reference in New Issue
Block a user