mirror of
https://github.com/ansible/awx.git
synced 2026-04-04 17:55:06 -02:30
Revert "emit job status over socket after database commit"
This reverts commit edefeeacdaf11cf484a4b4893ee9acde5ef85390.
This commit is contained in:
@@ -964,13 +964,10 @@ class UnifiedJob(PolymorphicModel, PasswordFieldsModel, CommonModelNameNotUnique
|
|||||||
|
|
||||||
# Save the pending status, and inform the SocketIO listener.
|
# Save the pending status, and inform the SocketIO listener.
|
||||||
self.update_fields(start_args=json.dumps(kwargs), status='pending')
|
self.update_fields(start_args=json.dumps(kwargs), status='pending')
|
||||||
|
self.websocket_emit_status("pending")
|
||||||
|
|
||||||
def post_commit():
|
from awx.main.scheduler.tasks import run_job_launch
|
||||||
from awx.main.scheduler.tasks import run_job_launch
|
connection.on_commit(lambda: run_job_launch.delay(self.id))
|
||||||
self.websocket_emit_status("pending")
|
|
||||||
run_job_launch.delay(self.id)
|
|
||||||
|
|
||||||
connection.on_commit(post_commit)
|
|
||||||
|
|
||||||
# Each type of unified job has a different Task class; get the
|
# Each type of unified job has a different Task class; get the
|
||||||
# appropirate one.
|
# appropirate one.
|
||||||
|
|||||||
Reference in New Issue
Block a user