mirror of
https://github.com/ansible/awx.git
synced 2026-05-18 06:47:41 -02:30
Merge pull request #3701 from AlanCoding/wf_socket
Get workflows and channels to work together
This commit is contained in:
@@ -384,6 +384,6 @@ class WorkflowJob(UnifiedJob, WorkflowJobOptions, JobNotificationMixin, Workflow
|
|||||||
if res:
|
if res:
|
||||||
self.status = 'running'
|
self.status = 'running'
|
||||||
self.save()
|
self.save()
|
||||||
self.socketio_emit_status("running")
|
self.websocket_emit_status("running")
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
|||||||
@@ -1685,7 +1685,7 @@ class RunWorkflowJob(BaseTask):
|
|||||||
def run(self, pk, **kwargs):
|
def run(self, pk, **kwargs):
|
||||||
#Run the job/task and capture its output.
|
#Run the job/task and capture its output.
|
||||||
instance = self.update_model(pk, status='running', celery_task_id=self.request.id)
|
instance = self.update_model(pk, status='running', celery_task_id=self.request.id)
|
||||||
instance.socketio_emit_status("running")
|
instance.websocket_emit_status("running")
|
||||||
|
|
||||||
# FIXME: Currently, the workflow job busy waits until the graph run is
|
# FIXME: Currently, the workflow job busy waits until the graph run is
|
||||||
# complete. Instead, the workflow job should return or never even run,
|
# complete. Instead, the workflow job should return or never even run,
|
||||||
@@ -1707,6 +1707,6 @@ class RunWorkflowJob(BaseTask):
|
|||||||
instance = self.update_model(instance.pk, status='successful')
|
instance = self.update_model(instance.pk, status='successful')
|
||||||
break
|
break
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
instance.socketio_emit_status(instance.status)
|
instance.websocket_emit_status(instance.status)
|
||||||
# TODO: Handle cancel
|
# TODO: Handle cancel
|
||||||
'''
|
'''
|
||||||
|
|||||||
Reference in New Issue
Block a user