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
|
The Tasks Executor object Main job of this object is a selection of scheduled tasks from the schedule and send them to the ExecutionEnvironmentManager object to set them to the Execution Environment for execution. More...
Public Member Functions | |
def | __del__ (self) |
destructor just in case More... | |
def | __init__ (self, configParser, connectBuilderLight) |
constructor initialise all connections and event handlers More... | |
def | onSchedulerRoute (self, event) |
handler to route all event to TaksManager More... | |
def | on_poll_timeout (self) |
function will call every time when ConnectionTimeout exception arrive More... | |
def | onAdminSuspend (self, event) |
onAdminState event handler process admin command More... | |
Public Member Functions inherited from app.BaseServerManager.BaseServerManager | |
def | __init__ (self, poller_manager=None, admin_connection=None, conectionLightBuilder=None, exceptionForward=False, dumpStatVars=True) |
constructor More... | |
def | addConnection (self, name, connection) |
def | setEventHandler (self, eventType, handler) |
set event handler rewrite the current handler for eventType More... | |
def | send (self, connect_name, event) |
send event More... | |
def | reply (self, event, reply_event) |
wrapper for sending event in reply for event More... | |
def | poll (self) |
poll function polling connections receive as multipart msg, the second argument is pickled pyobj More... | |
def | process (self, event) |
process event call the event handler method that was set by user or on_unhandled_event method if not set More... | |
def | run (self) |
def | is_connection_registered (self, name) |
check is a connection was registered in a instance of BaseServerManager i object More... | |
def | on_poll_timeout (self) |
function will call every time when ConnectionTimeout exception arrive More... | |
def | on_unhandled_event (self, event) |
function will call every time when arrive doesn't set handler for event type of event.evenType More... | |
def | build_poller_list (self) |
def | clear_poller (self) |
def | onAdminState (self, event) |
onAdminState event handler process admin SHUTDOWN command More... | |
def | onAdminFetchStatData (self, event) |
onAdminState event handler process admin command More... | |
def | onAdminSuspend (self, event) |
onAdminState event handler process admin command More... | |
def | getStatDataFields (self, fields) |
getStatDataFields returns stat data from storage More... | |
def | getSystemStat (self) |
getSystemStat returns stat data for system indicators: RAMV, RAMR and CPU More... | |
def | getConfigVarsFields (self, fields) |
getConfigVarsFields returns config vars from storage More... | |
def | onAdminGetConfigVars (self, event) |
onAdminGetConfigVars event handler process getConfigVars admin command, fill and return config vars array from internal storage More... | |
def | onAdminSetConfigVars (self, event) |
onAdminSetConfigVars event handler process setConfigVars admin command More... | |
def | setConfigVars (self, setConfigVars) |
processSetConfigVars sets config vars in storage More... | |
def | sendAdminReadyEvent (self) |
send ready event to notify adminInterfaceService More... | |
def | createLogMsg (self, event) |
from string message from event object More... | |
def | initStatFields (self, connect_name) |
add record in statFields More... | |
def | updateStatField (self, field_name, value, operation=STAT_FIELDS_OPERATION_ADD) |
update values of stat field - default sum More... | |
def | processSpecialConfigVars (self, name, value) |
send ready event to notify adminInterfaceService More... | |
def | getLogLevel (self) |
Get log level from first of existing loggers. More... | |
def | setLogLevel (self, level) |
Set log level for all loggers. More... | |
def | saveStatVarsDump (self) |
Save stat vars in json file. More... | |
def | loadStatVarsDump (self) |
Load stat vars in json file. More... | |
def | getStatVarsDumpFileName (self) |
Get stat vars file name. More... | |
def | createDBIDict (self, configParser) |
Public Attributes | |
executionEnvironmentManager | |
scheduler | |
processEvents | |
isReqSended | |
old | |
Public Attributes inherited from app.BaseServerManager.BaseServerManager | |
dumpStatVars | |
poller_manager | |
eventBuilder | |
exit_flag | |
pollTimeout | |
connections | |
event_handlers | |
statFields | |
stat fields container More... | |
configVars | |
exceptionForward | |
Static Public Attributes | |
string | CONFIG_TIME_SLOT_PERIOD = "timeSlotPeriod" |
string | STAT_SUSPEND_STATE = "suspendState" |
Static Public Attributes inherited from app.BaseServerManager.BaseServerManager | |
string | ADMIN_CONNECT_ENDPOINT = "Admin" |
string | ADMIN_CONNECT_CLIENT = "Admin" |
int | POLL_TIMEOUT_DEFAULT = 3000 |
int | STAT_FIELDS_OPERATION_ADD = 0 |
int | STAT_FIELDS_OPERATION_SUB = 1 |
int | STAT_FIELDS_OPERATION_SET = 2 |
int | STAT_FIELDS_OPERATION_INIT = 3 |
string | POLL_TIMEOUT_CONFIG_VAR_NAME = "POLL_TIMEOUT" |
string | LOG_LEVEL_CONFIG_VAR_NAME = "LOG_LEVEL" |
string | STAT_DUMPS_DEFAULT_DIR = "/tmp/" |
string | STAT_DUMPS_DEFAULT_NAME = "%APP_NAME%_%CLASS_NAME%_stat_vars.dump" |
dictionary | LOGGERS_NAMES = {APP_CONSTS.LOGGER_NAME, "dc", "dtm", "root", ""} |
The Tasks Executor object Main job of this object is a selection of scheduled tasks from the schedule and send them to the ExecutionEnvironmentManager object to set them to the Execution Environment for execution.
Definition at line 35 of file TasksExecutor.py.
def dtm.TasksExecutor.TasksExecutor.__del__ | ( | self | ) |
def dtm.TasksExecutor.TasksExecutor.__init__ | ( | self, | |
configParser, | |||
connectBuilderLight | |||
) |
constructor initialise all connections and event handlers
Definition at line 50 of file TasksExecutor.py.
def dtm.TasksExecutor.TasksExecutor.on_poll_timeout | ( | self | ) |
function will call every time when ConnectionTimeout exception arrive
Definition at line 107 of file TasksExecutor.py.
def dtm.TasksExecutor.TasksExecutor.onAdminSuspend | ( | self, | |
event | |||
) |
onAdminState event handler process admin command
event | instance of Event object |
Definition at line 125 of file TasksExecutor.py.
def dtm.TasksExecutor.TasksExecutor.onSchedulerRoute | ( | self, | |
event | |||
) |
handler to route all event to TaksManager
even | instance of Event object |
Definition at line 92 of file TasksExecutor.py.
|
static |
Definition at line 37 of file TasksExecutor.py.
dtm.TasksExecutor.TasksExecutor.executionEnvironmentManager |
Definition at line 64 of file TasksExecutor.py.
dtm.TasksExecutor.TasksExecutor.isReqSended |
Definition at line 82 of file TasksExecutor.py.
dtm.TasksExecutor.TasksExecutor.old |
Definition at line 84 of file TasksExecutor.py.
dtm.TasksExecutor.TasksExecutor.processEvents |
Definition at line 75 of file TasksExecutor.py.
dtm.TasksExecutor.TasksExecutor.scheduler |
Definition at line 65 of file TasksExecutor.py.
|
static |
Definition at line 38 of file TasksExecutor.py.