def _handle_cancel(self, *args):
        """The CANCEL handler"""
        job_id = int(args[1])
        self.log.warn("Master | Execution of %s canceled", job_id)
        job = None
        if self.running in job_id:
            self.log.warn("Master | Terminating %s", job_id)
            job = self.running[job_id]
            job.process.terminate()
            job.process.join()
            job.process = None
            self.slots_available += job.threads
            del self.running[job_id]
        elif job_id in self.queued:
            job = self.queued[job_id]
            del self.queued[job_id]
        else:
            self.log.warn("Master | Execution %s cancellation requested, but "
                          "job could not be found!", job_id)
        if job:
            self._update_dependencies(job)
            self._remove_children(job)
            self.schedule()
        return True
dataset/ETHPy150Open thasso/pyjip/jip/grids.py/_GridMaster._handle_cancel/swapped operands of `in`