コード例 #1
0
ファイル: TaskCmds.py プロジェクト: makeittotop/py_queue
 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")
コード例 #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")
コード例 #3
0
ファイル: test.py プロジェクト: 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
コード例 #4
0
    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)