def processObject(self, obj): """Operate on the provided job object.""" # ask the user if we should continue if not obj.pre(self, "Undelete this job?"): return # try to run the operation query.undelete(obj) obj.post(self, "undeleted")
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) print "undelete" tq.undelete(job) def test_task_ops(task): print "retry" tq.retry(task) print "resume" tq.resume(task) print "skip" tq.skip(task) print "log" log = tq.log(task) print log def test_command_ops(command): print "cattr" tq.cattr(command, key="tags", value=["new", "tags"])