def start_processing(workflow): if app.config['mode'] not in ('processor', 'full'): raise ApiException("Only possible when running in 'processor' or" " 'full' mode.", 503) workflow._update_status(step='process', step_progress=None) from tasks import process_workflow process_workflow(workflow.id, app.config['base_path']) return 'OK'
def process(self): workflow = get_object_or_404(WorkflowPage, page_ptr_id=self.cleaned_data["workflow_page_id"]) applied_to_revision = get_object_or_404(WorkflowDataRevision, id=self.cleaned_data["applied_to_revision_id"]) processing_step = self.get_processing_step_as_json() new_processing_steps = json.loads(applied_to_revision.steps_json) new_processing_steps.append(processing_step) print applied_to_revision.steps_json print new_processing_steps process_workflow(self.cleaned_data["workflow_page_id"], new_processing_steps, label=self.cleaned_data["label"])
def start_processing(workflow): check_processing_allowed() workflow._update_status(step='process', step_progress=None) from tasks import process_workflow process_workflow(workflow.id, app.config['base_path']) return 'OK'
def start_processing(workflow): """ Enqueue the specified workflow for postprocessing. """ workflow._update_status(step='process', step_progress=None) from tasks import process_workflow process_workflow(workflow.id, app.config['base_path']) return 'OK'