HCE Project Python language Distributed Tasks Manager Application, Distributed Crawler Application and client API bindings.  2.0.0-chaika
Hierarchical Cluster Engine Python language binding
dtm.EventObjects.Task Class Reference

Task event object, defines the Task object fields. More...

Inheritance diagram for dtm.EventObjects.Task:
Collaboration diagram for dtm.EventObjects.Task:

Public Member Functions

def __init__ (self)
 constructor initialize task's fields More...
 
def setSessionVar (self, sessionVarName, sessionVarValue)
 Set the OS session variable for EE process. More...
 
def setStrategyVar (self, strategyVarName, strategyVarValue)
 Set the strategy variable. More...
 
def setFile (self, fileItem)
 Set the file item. More...
 
def setLimitsVar (self, limitsVarName, limitsVarValue)
 Set the limits variable. More...
 

Public Attributes

 id
 The task Id. More...
 
 command
 The task command line to execute inside EE. More...
 
 input
 The task cstdin stream buffer for EE process. More...
 
 files
 The task files items attached init. More...
 
 session
 The task session items init. More...
 
 strategy
 The task strategy items init. More...
 
 limits
 The task limits init. More...
 
 autoCleanupFields
 The task autoCleanupFields init. More...
 
 type
 The task type init. More...
 
 name
 The task name init. More...
 

Static Public Attributes

int FILE_ACTION_CREATE_BEFORE = 1
 
int FILE_ACTION_DELETE_BEFORE = 2
 
int FILE_ACTION_READ_AFTER = 4
 
int FILE_ACTION_DELETE_AFTER = 8
 
int FILE_ACTION_BASE64_ENCODED = 2147483648
 
string STRATEGY_DATE = "DATE"
 
string STRATEGY_DATE_MAX = "DATE_MAX"
 
string STRATEGY_DATE_SHIFT = "DATE_SHIFT"
 
string STRATEGY_CPU = "CPU"
 
string STRATEGY_RAM_FREE = "RAM_FREE"
 
string STRATEGY_RAM = "RAM"
 
string STRATEGY_DISK_FREE = "DISK_FREE"
 
string STRATEGY_DISK = "DISK"
 
string STRATEGY_TIME = "TIME"
 
string STRATEGY_THREADS = "THREADS"
 
string STRATEGY_SDELAY = "SDELAY"
 
string STRATEGY_RDELAY = "RDELAY"
 
string STRATEGY_RETRY = "RETRY"
 
string STRATEGY_PRIORITY = "PRIORITY"
 
string STRATEGY_CPU_LOAD_MAX = "CPU_LOAD_MAX"
 
string STRATEGY_IO_WAIT_MAX = "IO_WAIT_MAX"
 
string STRATEGY_autoCleanupFields = "autoCleanupFields"
 
string STRATEGY_AUTOCLEANUP_TTL = "TTL"
 
string STRATEGY_AUTOCLEANUP_DELETE_TYPE = "DeleteType"
 
string STRATEGY_AUTOCLEANUP_DELETE_RETRIES = "DeleteRetries"
 
string STRATEGY_AUTOCLEANUP_SSTATE = "State"
 
int TASK_MODE_SYNCH = 1
 
int TASK_MODE_ASYNCH = 2
 
int TIME_MAX_DEFAULT = 60000
 
int TASK_TYPE_SHELL = 0
 
int TASK_TYPE_SSH = 1
 
int TYPE_DEFAULT = 0
 

Detailed Description

Task event object, defines the Task object fields.

The task object used to create task representation inside DTM application. This is a main data unit that is used by DTM inside to operate.

Definition at line 34 of file EventObjects.py.

Constructor & Destructor Documentation

◆ __init__()

def dtm.EventObjects.Task.__init__ (   self)

constructor initialize task's fields

Definition at line 78 of file EventObjects.py.

78  def __init__(self):
79 
81  self.id = None
82 
84  self.command = None
85 
87  self.input = None
88 
90  self.files = []
91 
93  self.session = {}
94 
96  self.strategy = {}
97 
99  self.limits = {}
100 
102  self.autoCleanupFields = {}
103 
105  self.type = self.TYPE_DEFAULT
106 
108  self.name = ""
109 
110 
def __init__(self)
constructor
Definition: UIDGenerator.py:19

Member Function Documentation

◆ setFile()

def dtm.EventObjects.Task.setFile (   self,
  fileItem 
)

Set the file item.

Appends file item to files container

Parameters
fileItemThe file item for files container, format (fileName, byteStream, actionMask).
Returns
nothing

Definition at line 133 of file EventObjects.py.

133  def setFile(self, fileItem):
134  self.files.append(fileItem)
135 
136 

◆ setLimitsVar()

def dtm.EventObjects.Task.setLimitsVar (   self,
  limitsVarName,
  limitsVarValue 
)

Set the limits variable.

Parameters
limitsVarNameThe limits variable name.
limitsVarValueThe limits variable value.
Returns
nothing

Definition at line 142 of file EventObjects.py.

142  def setLimitsVar(self, limitsVarName, limitsVarValue):
143  self.limits[limitsVarName] = limitsVarValue
144 
145 
146 

◆ setSessionVar()

def dtm.EventObjects.Task.setSessionVar (   self,
  sessionVarName,
  sessionVarValue 
)

Set the OS session variable for EE process.

Parameters
sessionVarNameThe session variable name.
sessionVarValueThe session variable value.
Returns
nothing

Definition at line 116 of file EventObjects.py.

116  def setSessionVar(self, sessionVarName, sessionVarValue):
117  self.session[sessionVarName] = sessionVarValue
118 
119 

◆ setStrategyVar()

def dtm.EventObjects.Task.setStrategyVar (   self,
  strategyVarName,
  strategyVarValue 
)

Set the strategy variable.

Parameters
strategyVarNameThe strategy variable name.
strategyVarValueThe strategy variable value.
Returns
nothing

Definition at line 125 of file EventObjects.py.

125  def setStrategyVar(self, strategyVarName, strategyVarValue):
126  self.strategy[strategyVarName] = strategyVarValue
127 
128 

Member Data Documentation

◆ autoCleanupFields

dtm.EventObjects.Task.autoCleanupFields

The task autoCleanupFields init.

Definition at line 102 of file EventObjects.py.

◆ command

dtm.EventObjects.Task.command

The task command line to execute inside EE.

Definition at line 84 of file EventObjects.py.

◆ FILE_ACTION_BASE64_ENCODED

int dtm.EventObjects.Task.FILE_ACTION_BASE64_ENCODED = 2147483648
static

Definition at line 40 of file EventObjects.py.

◆ FILE_ACTION_CREATE_BEFORE

int dtm.EventObjects.Task.FILE_ACTION_CREATE_BEFORE = 1
static

Definition at line 36 of file EventObjects.py.

◆ FILE_ACTION_DELETE_AFTER

int dtm.EventObjects.Task.FILE_ACTION_DELETE_AFTER = 8
static

Definition at line 39 of file EventObjects.py.

◆ FILE_ACTION_DELETE_BEFORE

int dtm.EventObjects.Task.FILE_ACTION_DELETE_BEFORE = 2
static

Definition at line 37 of file EventObjects.py.

◆ FILE_ACTION_READ_AFTER

int dtm.EventObjects.Task.FILE_ACTION_READ_AFTER = 4
static

Definition at line 38 of file EventObjects.py.

◆ files

dtm.EventObjects.Task.files

The task files items attached init.

Definition at line 90 of file EventObjects.py.

◆ id

dtm.EventObjects.Task.id

The task Id.

Definition at line 81 of file EventObjects.py.

◆ input

dtm.EventObjects.Task.input

The task cstdin stream buffer for EE process.

Definition at line 87 of file EventObjects.py.

◆ limits

dtm.EventObjects.Task.limits

The task limits init.

Definition at line 99 of file EventObjects.py.

◆ name

dtm.EventObjects.Task.name

The task name init.

Definition at line 108 of file EventObjects.py.

◆ session

dtm.EventObjects.Task.session

The task session items init.

Definition at line 93 of file EventObjects.py.

◆ strategy

dtm.EventObjects.Task.strategy

The task strategy items init.

Definition at line 96 of file EventObjects.py.

◆ STRATEGY_AUTOCLEANUP_DELETE_RETRIES

string dtm.EventObjects.Task.STRATEGY_AUTOCLEANUP_DELETE_RETRIES = "DeleteRetries"
static

Definition at line 62 of file EventObjects.py.

◆ STRATEGY_AUTOCLEANUP_DELETE_TYPE

string dtm.EventObjects.Task.STRATEGY_AUTOCLEANUP_DELETE_TYPE = "DeleteType"
static

Definition at line 61 of file EventObjects.py.

◆ STRATEGY_AUTOCLEANUP_SSTATE

string dtm.EventObjects.Task.STRATEGY_AUTOCLEANUP_SSTATE = "State"
static

Definition at line 63 of file EventObjects.py.

◆ STRATEGY_AUTOCLEANUP_TTL

string dtm.EventObjects.Task.STRATEGY_AUTOCLEANUP_TTL = "TTL"
static

Definition at line 60 of file EventObjects.py.

◆ STRATEGY_autoCleanupFields

string dtm.EventObjects.Task.STRATEGY_autoCleanupFields = "autoCleanupFields"
static

Definition at line 58 of file EventObjects.py.

◆ STRATEGY_CPU

string dtm.EventObjects.Task.STRATEGY_CPU = "CPU"
static

Definition at line 45 of file EventObjects.py.

◆ STRATEGY_CPU_LOAD_MAX

string dtm.EventObjects.Task.STRATEGY_CPU_LOAD_MAX = "CPU_LOAD_MAX"
static

Definition at line 56 of file EventObjects.py.

◆ STRATEGY_DATE

string dtm.EventObjects.Task.STRATEGY_DATE = "DATE"
static

Definition at line 42 of file EventObjects.py.

◆ STRATEGY_DATE_MAX

string dtm.EventObjects.Task.STRATEGY_DATE_MAX = "DATE_MAX"
static

Definition at line 43 of file EventObjects.py.

◆ STRATEGY_DATE_SHIFT

string dtm.EventObjects.Task.STRATEGY_DATE_SHIFT = "DATE_SHIFT"
static

Definition at line 44 of file EventObjects.py.

◆ STRATEGY_DISK

string dtm.EventObjects.Task.STRATEGY_DISK = "DISK"
static

Definition at line 49 of file EventObjects.py.

◆ STRATEGY_DISK_FREE

string dtm.EventObjects.Task.STRATEGY_DISK_FREE = "DISK_FREE"
static

Definition at line 48 of file EventObjects.py.

◆ STRATEGY_IO_WAIT_MAX

string dtm.EventObjects.Task.STRATEGY_IO_WAIT_MAX = "IO_WAIT_MAX"
static

Definition at line 57 of file EventObjects.py.

◆ STRATEGY_PRIORITY

string dtm.EventObjects.Task.STRATEGY_PRIORITY = "PRIORITY"
static

Definition at line 55 of file EventObjects.py.

◆ STRATEGY_RAM

string dtm.EventObjects.Task.STRATEGY_RAM = "RAM"
static

Definition at line 47 of file EventObjects.py.

◆ STRATEGY_RAM_FREE

string dtm.EventObjects.Task.STRATEGY_RAM_FREE = "RAM_FREE"
static

Definition at line 46 of file EventObjects.py.

◆ STRATEGY_RDELAY

string dtm.EventObjects.Task.STRATEGY_RDELAY = "RDELAY"
static

Definition at line 53 of file EventObjects.py.

◆ STRATEGY_RETRY

string dtm.EventObjects.Task.STRATEGY_RETRY = "RETRY"
static

Definition at line 54 of file EventObjects.py.

◆ STRATEGY_SDELAY

string dtm.EventObjects.Task.STRATEGY_SDELAY = "SDELAY"
static

Definition at line 52 of file EventObjects.py.

◆ STRATEGY_THREADS

string dtm.EventObjects.Task.STRATEGY_THREADS = "THREADS"
static

Definition at line 51 of file EventObjects.py.

◆ STRATEGY_TIME

string dtm.EventObjects.Task.STRATEGY_TIME = "TIME"
static

Definition at line 50 of file EventObjects.py.

◆ TASK_MODE_ASYNCH

int dtm.EventObjects.Task.TASK_MODE_ASYNCH = 2
static

Definition at line 66 of file EventObjects.py.

◆ TASK_MODE_SYNCH

int dtm.EventObjects.Task.TASK_MODE_SYNCH = 1
static

Definition at line 65 of file EventObjects.py.

◆ TASK_TYPE_SHELL

int dtm.EventObjects.Task.TASK_TYPE_SHELL = 0
static

Definition at line 70 of file EventObjects.py.

◆ TASK_TYPE_SSH

int dtm.EventObjects.Task.TASK_TYPE_SSH = 1
static

Definition at line 71 of file EventObjects.py.

◆ TIME_MAX_DEFAULT

int dtm.EventObjects.Task.TIME_MAX_DEFAULT = 60000
static

Definition at line 68 of file EventObjects.py.

◆ type

dtm.EventObjects.Task.type

The task type init.

Definition at line 105 of file EventObjects.py.

◆ TYPE_DEFAULT

int dtm.EventObjects.Task.TYPE_DEFAULT = 0
static

Definition at line 73 of file EventObjects.py.


The documentation for this class was generated from the following file: