Пример #1
0
 def processObject(self, obj):
     """Operate on the provided job object."""
     # ask the user if we should continue
     if not obj.pre(self, "Restart this job?"):
         return
     # try to run the operation
     query.restart(obj)
     obj.post(self, "restarted")
Пример #2
0
 def processObject(self, obj):
     """Operate on the provided job object."""
     # ask the user if we should continue
     if not obj.pre(self, "Restart this job?"):
         return
     # try to run the operation
     query.restart(obj)
     obj.post(self, "restarted")
Пример #3
0
Файл: test.py Проект: utsdab/usr
 tq.jattr(job, key="comment", value="new comment")
 print "pause"
 tq.pause(job)
 print "unpause"
 tq.unpause(job)
 print "lock"
 tq.lock(job)
 print "unlock"
 tq.unlock(job)
 print "interrupt"
 try:
     tq.interrupt(job)
 except EngineClient.TransactionError, err:
     print "received exception for interrupting job - we should fix that"
 print "restart"
 tq.restart(job)
 print "retryactive"
 tq.retryactive(job)
 print "retryerrors"
 tq.retryerrors(job)
 print "skiperrors"
 tq.skiperrors(job)
 print "delay"
 try:
     tq.delay(job, aftertime="2015-01-01 1:35:00")
 except TypeError, err:
     print "we should fix modules so we don't get this type error: %s" % str(err)
 print "undelay"
 tq.undelay(job)
 print "delete"
 tq.delete(job)