Home | Trees | Indices | Help |
|
---|
|
object --+ | threading._Verbose --+ | threading.Thread --+ | MetaScheduler --+ | Scheduler
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from Inherited from Inherited from Inherited from |
|
|||
Inherited from Inherited from Inherited from |
|
This constructor should always be called with keyword arguments. Arguments are: *group* should be None; reserved for future extension when a ThreadGroup class is implemented. *target* is the callable object to be invoked by the run() method. Defaults to None, meaning nothing is called. *name* is the thread name. By default, a unique name is constructed of the form "Thread-N" where N is a small decimal number. *args* is the argument tuple for the target invocation. Defaults to (). *kwargs* is a dictionary of keyword arguments for the target invocation. Defaults to {}. If a subclass overrides the constructor, it must make sure to invoke the base class constructor (Thread.__init__()) before doing anything else to the thread.
|
|
|
|
|
|
Queue tasks. This takes care of handling the validation of all values. :param function: the function (anything callable with a __name__) :param pargs: "raw" args to be passed to the function. Automatically jsonified. :param pvars: "raw" kwargs to be passed to the function. Automatically jsonified :param kwargs: all the scheduler_task columns. args and vars here should be in json format already, they will override pargs and pvars returns a dict just as a normal validate_and_insert, plus a uuid key holding the uuid of the queued task. If validation is not passed, both id and uuid will be None, and you'll get an "error" dict holding the errors found. |
Shortcut for task status retrieval :param ref: can be - integer --> lookup will be done by scheduler_task.id - string --> lookup will be done by scheduler_task.uuid - query --> lookup as you wish (as in db.scheduler_task.task_name == 'test1') :param output: fetch also the scheduler_run record Returns a single Row object, for the last queued task If output == True, returns also the last scheduler_run record scheduler_run record is fetched by a left join, so it can have all fields == None |
Experimental!!! Shortcut for task termination. If the task is RUNNING it will terminate it --> execution will be set as FAILED If the task is QUEUED, its stop_time will be set as to "now", the enabled flag will be set to False, status to STOPPED :param ref: can be - integer --> lookup will be done by scheduler_task.id - string --> lookup will be done by scheduler_task.uuid Returns: - 1 if task was stopped (meaning an update has been done) - None if task was not found, or if task was not RUNNING or QUEUED |
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Sun Mar 16 02:36:17 2014 | http://epydoc.sourceforge.net |