Exemple #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
Exemple #2
0
    def cancel(self):
        if self.jobid is None:
            raise JobNotStartedError('cannot cancel an unstarted job')

        return self.scheduler.cancel(self)
Exemple #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()
Exemple #4
0
 def finished(self):
     if self._jobid is None:
         raise JobNotStartedError('cannot poll an unstarted job')
Exemple #5
0
 def cancel(self):
     if self._jobid is None:
         raise JobNotStartedError('cannot cancel an unstarted job')
Exemple #6
0
 def wait(self):
     if self._jobid is None:
         raise JobNotStartedError('cannot wait an unstarted job')