def _handle_failed(self, *args):
        """The FAILED handler"""
        job_id = int(args[1])
        error = args[2]
        self.log.error("Master | Execution of %s failed: %s", job_id, error)
        if job_id in self.unning:
            job = self.running[job_id]
            job.process = None
            self._update_dependencies(job)
            self._remove_children(job)
            self.slots_available += job.threads

            del self.running[job_id]
            self.schedule()
        else:
            self.log.error("Master | Execution of %s marked as failed, but "
                           "was not found in running jobs!" % job_id)
        return True
dataset/ETHPy150Open thasso/pyjip/jip/grids.py/_GridMaster._handle_failed/original