From ba469a8c13d3fb0e4e2bdc970dcd08cdb41d35d4 Mon Sep 17 00:00:00 2001 From: Matthew Jones Date: Thu, 20 Oct 2016 13:34:10 -0400 Subject: [PATCH] Remove spurious workflow job class --- awx/main/tasks.py | 35 ----------------------------------- 1 file changed, 35 deletions(-) diff --git a/awx/main/tasks.py b/awx/main/tasks.py index 814700afd3..bc8013be57 100644 --- a/awx/main/tasks.py +++ b/awx/main/tasks.py @@ -1739,38 +1739,3 @@ class RunSystemJob(BaseTask): def build_cwd(self, instance, **kwargs): return settings.BASE_DIR - -''' -class RunWorkflowJob(BaseTask): - - name = 'awx.main.tasks.run_workflow_job' - model = WorkflowJob - - def run(self, pk, **kwargs): - #Run the job/task and capture its output. - instance = self.update_model(pk, status='running', celery_task_id=self.request.id) - instance.websocket_emit_status("running") - - # FIXME: Currently, the workflow job busy waits until the graph run is - # complete. Instead, the workflow job should return or never even run, - # because all of the "launch logic" can be done schedule(). - - # However, other aspects of our system depend on a 1-1 relationship - # between a Job and a Celery Task. - # - # * If we let the workflow job task (RunWorkflowJob.run()) complete - # then how do we trigger the handle_work_error and - # handle_work_success subtasks? - # - # * How do we handle the recovery process? (i.e. there is an entry in - # the database but not in celery). - while True: - dag = WorkflowDAG(instance) - if dag.is_workflow_done(): - # TODO: update with accurate finish status (i.e. canceled, error, etc.) - instance = self.update_model(instance.pk, status='successful') - break - time.sleep(1) - instance.websocket_emit_status(instance.status) - # TODO: Handle cancel -'''