def cancel_task(self, task): worker = self._get_task_worker(task) if worker: self._cleanup_worker_resources(worker) # terminate the worker and all its children force_kill_process_and_children(worker.pid) self._clean_task(task)
def kill_engine_process(self): self.info("Attempting to kill engine process") pid = self._read_process_pid() if pid: self.info("Killing engine process '%s' using signal 9" % pid) force_kill_process_and_children(pid) else: raise BackupEngineError("Unable to determine engine process id")