Esempio n. 1
0
 def processObject(self, obj):
     """Operate on the provided task object."""
     # ask the user if we should continue
     if not obj.pre(self, "Skip this task?"):
         return
     # try to run the operation
     query.skip(obj)
     obj.post(self, "skipped")
Esempio n. 2
0
 def processObject(self, obj):
     """Operate on the provided task object."""
     # ask the user if we should continue
     if not obj.pre(self, "Skip this task?"):
         return
     # try to run the operation
     query.skip(obj)
     obj.post(self, "skipped")
Esempio n. 3
0
File: test.py Progetto: utsdab/usr
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 KillJob(self):

        setup_tq_ownership = tq.setEngineClientParam(hostname="10.180.128.5",
                                                     port=8080,
                                                     user="******",
                                                     debug=True)

        cur_task = tq.tasks("jid={} and tid=1".format(self.GetJobId()),
                            columns=["Job.owner"])
        tq.skip(cur_task)
        tq.kill(cur_task)
        sleep(5)