@property
    def complete(self):
        background_complete = bool(self.background and self.state in (JOB_CREATED))
        foreground_complete = bool(not self.background and self.state in (JOB_FAILED, JOB_COMPLETE))

        actually_complete = background_complete or foreground_complete
        return actually_complete
dataset/ETHPy150Open YelpArchive/python-gearman/gearman/job.py/GearmanJobRequest.complete/original