示例#1
0
    def finished(self):
        if self.jobid is None:
            raise JobNotStartedError('cannot poll an unstarted job')

        done = self.scheduler.finished(self)
        if done:
            self._completion_time = self._completion_time or time.time()

        return done
示例#2
0
    def cancel(self):
        if self.jobid is None:
            raise JobNotStartedError('cannot cancel an unstarted job')

        return self.scheduler.cancel(self)
示例#3
0
    def wait(self):
        if self.jobid is None:
            raise JobNotStartedError('cannot wait an unstarted job')

        self.scheduler.wait(self)
        self._completion_time = self._completion_time or time.time()
示例#4
0
 def finished(self):
     if self._jobid is None:
         raise JobNotStartedError('cannot poll an unstarted job')
示例#5
0
 def cancel(self):
     if self._jobid is None:
         raise JobNotStartedError('cannot cancel an unstarted job')
示例#6
0
 def wait(self):
     if self._jobid is None:
         raise JobNotStartedError('cannot wait an unstarted job')