def _handle_done(self, *args):
        """The DONE handler"""
        job_id = int(args[1])
        state = args[2]
        if self.running in job_id:
            job = self.running[job_id]
            job.process.join()
            job.process = None
            self.slots_available += job.threads
            self._update_dependencies(job)
            if state != 0:
                self.log.error("Master | Job %s failed with %s",
                               job_id, state)
                self._remove_children(job)
            else:
                self.log.info("Master | Job %s finished with %s",
                              job_id, state)
            job.process = None
            del self.running[job_id]
            self.schedule()
        else:
            self.log.warn("Master | Job %s marked as done, but was "
                          "not found in running jobs!", job_id)
        return True
dataset/ETHPy150Open thasso/pyjip/jip/grids.py/_GridMaster._handle_done/swapped operands of `in`