$handlerInstance = new TaskHandler();
// Output debug message
- self::createDebugInstance(__CLASS__)->debugOutput('TASK-HANDLER: Initializing task handler.');
+ self::createDebugInstance(__CLASS__)->debugOutput('TASK-HANDLER[' . __LINE__ . ']: Initializing task handler.');
// Init the task list
$handlerInstance->setListInstance(ObjectFactory::createObjectByConfiguredName('task_list_class'));
$handlerInstance->registerTask('idle_loop', $taskInstance);
// Output debug message
- self::createDebugInstance(__CLASS__)->debugOutput('TASK-HANDLER: Task handler initialized.');
+ self::createDebugInstance(__CLASS__)->debugOutput('TASK-HANDLER[' . __LINE__ . ']: Task handler initialized.');
// Return the prepared instance
return $handlerInstance;
$updateTask = true;
// Debug message
- self::createDebugInstance(__CLASS__)->debugOutput('TASK-HANDLER: Task ' . $currentTask['id'] . ' started with startup_delay=' . $currentTask['task_startup_delay'] . 'ms');
+ self::createDebugInstance(__CLASS__)->debugOutput('TASK-HANDLER[' . __LINE__ . ']: Task ' . $currentTask['id'] . ' started with startup_delay=' . $currentTask['task_startup_delay'] . 'ms');
} // END - if
// Get time difference from interval delay
*/
private function unregisterTask (array $taskData) {
// Debug output
- self::createDebugInstance(__CLASS__)->debugOutput('TASK-HANDLER: Removing task ' . $taskData['id'] . ' from queue - START');
+ self::createDebugInstance(__CLASS__)->debugOutput('TASK-HANDLER[' . __LINE__ . ']: Removing task ' . $taskData['id'] . ' from queue - START');
// Remove the entry
$this->getListInstance()->removeEntry('tasks', $taskData);
// Debug output
- self::createDebugInstance(__CLASS__)->debugOutput('TASK-HANDLER: Removing task ' . $taskData['id'] . ' from queue - FINISHED');
+ self::createDebugInstance(__CLASS__)->debugOutput('TASK-HANDLER[' . __LINE__ . ']: Removing task ' . $taskData['id'] . ' from queue - FINISHED');
}
/**
$this->getListInstance()->addEntry('tasks', $taskEntry);
// Debug message
- self::createDebugInstance(__CLASS__)->debugOutput('TASK-HANDLER: Task registered: taskName=' . $taskName .
+ self::createDebugInstance(__CLASS__)->debugOutput('TASK-HANDLER[' . __LINE__ . ']: Task registered: taskName=' . $taskName .
' (taskInstance=' . $taskInstance->__toString() . ')' .
', startupDelay=' . $taskEntry['task_startup_delay'] . 'ms' .
', intervalDelay=' . $taskEntry['task_interval_delay'] . 'ms' .
$this->getListInstance()->getIterator()->rewind();
// Debug message
- self::createDebugInstance(__CLASS__)->debugOutput('TASK-HANDLER: Shutting down all ' . $this->getListInstance()->count() . ' tasks...');
+ self::createDebugInstance(__CLASS__)->debugOutput('TASK-HANDLER[' . __LINE__ . ']: Shutting down all ' . $this->getListInstance()->count() . ' tasks...');
// Remember all tasks that has been shutdown for removal
$tasks = array();
$currentTask = $this->getListInstance()->getIterator()->current();
// Output debug message
- self::createDebugInstance(__CLASS__)->debugOutput('TASK-HANDLER: Shutting down task ' . $currentTask['id'] . ' (taskInstance=' . $currentTask['task_instance']->__toString() . ') ...');
+ self::createDebugInstance(__CLASS__)->debugOutput('TASK-HANDLER[' . __LINE__ . ']: Shutting down task ' . $currentTask['id'] . ' (taskInstance=' . $currentTask['task_instance']->__toString() . ') ...');
// Shutdown the task
$currentTask['task_instance']->accept($this->getVisitorInstance());
} // END - while
// Debug message
- self::createDebugInstance(__CLASS__)->debugOutput('TASK-HANDLER: Shutdown of all tasks completed.');
+ self::createDebugInstance(__CLASS__)->debugOutput('TASK-HANDLER[' . __LINE__ . ']: Shutdown of all tasks completed.');
// Remove all tasks
foreach ($tasks as $entry) {