new
Constructor
- state
-
Directory path where various run-time files are kept. Defaults to state/.
METHODS
get_task_status($task_name)
Returns the saved status
Example: status => { 'is_my_pid' => 0, 'is_running' => 1, 'save_ts' => 1370987265, 'task_count' => 1, 'fd_count' => 5, 'cmdline' => '/usr/bin/perlbin/MultiModule-qtqueue-pMultiModuleTest::-oalert:test_alert_queue,this:that-mOtherExternalModule', 'stat' => '3577 (MultiModule) S 1 13564 19489 34848 13564 4202496 3202 0 0 0 16 3 0 0 20 0 1 0 36033429 71139328 2949 18446744073709551615 4194304 4198756 140735555873936 140735555873176 139685157236755 0 0 4096 16384 18446744071580469929 0 0 17 2 0 0 0 0 0 ', 'pid' => 3577, 'statm' => '17368 2949 624 2 0 5133 0 },
get_task_config($task_name)
Return the tasks's config.
Example: config => { 'increment_by' => 8427, 'is_external' => 1 };
get_task_state($task_name)
Returns the saved state
Example: state => '.multimodule' => { 'save_ts' => 1370987685 }, 'most_recent' => 10246, 'sum_increment_by' => 6585
}
unfailsafe_task($task_name)
Causes a task to no longer be failsafe
failsafe_task($task_name)
Marks a task as failsafed.
task_is_failsafe($task_name)
Returns 'true' if the task is failsafe
save_task_status($task_name, $status)
Save the task status.
save_task_state($task_name, $state)
Save the task state.
get_task_status_files
Return an array of state files.
save_task_config($task_name, $config)
Save the task config.
send_signal($task_name, $integer_UNIX_signal)
Send specified signal to task.