[文档]classTimeLimitExceeded(Exception):"""The time limit has been exceeded and the job has been terminated."""def__str__(self):return"TimeLimitExceeded%s"%(self.args,)
[文档]classSoftTimeLimitExceeded(Exception):"""The soft time limit has been exceeded. This exception is raised to give the task a chance to clean up."""def__str__(self):return"SoftTimeLimitExceeded%s"%(self.args,)
[文档]classWorkerLostError(Exception):"""The worker processing a job has exited prematurely."""
[文档]classTerminated(Exception):"""The worker processing a job has been terminated by user request."""
classRestartFreqExceeded(Exception):"""Restarts too fast."""classCoroStop(Exception):"""Coroutine exit, as opposed to StopIteration which may mean it should be restarted."""pass