def job_stop(project_id, job_exec_id): job_execution = JobExecution.query.filter_by(project_id=project_id, id=job_exec_id).first() agent.cancel_spider(job_execution) return redirect(request.referrer, code=302)
def put(self, project_id, job_exec_id): job_execution = JobExecution.query.filter_by(project_id=project_id, id=job_exec_id).first() if job_execution: agent.cancel_spider(job_execution) return True