ajenti.plugins.tasks.api

class ajenti.plugins.tasks.api.JobDefinition(j={})[source]
save()[source]
class ajenti.plugins.tasks.api.Task(**kwargs)[source]

Base class for custom tasks

Parameters:
  • name – display name
  • ui – full layout name for parameter editor, will be bound to parameter dictionary (so begin it with <bind:dict bind=”params”>)
  • hidden – if True, task won’t be available for manual creation
abort()[source]
get_progress()[source]
hidden = False
init()[source]
name = '---'
run(**kwargs)[source]

Override with your task actions here. Raise TaskError in case of emergency. Check aborted often and return if it’s True

set_progress(current, max)[source]
start()[source]
ui = None
class ajenti.plugins.tasks.api.TaskDefinition(j={}, task_class=None)[source]
get_class()[source]
save()[source]
exception ajenti.plugins.tasks.api.TaskError[source]
class ajenti.plugins.tasks.api.TaskResult[source]
ABORTED = 1
CRASH = 3
ERROR = 2
SUCCESS = 0
comments powered by Disqus