Running Tasks GetRunningTaskList(); $TaskCount = count($Tasks); print(number_format($TaskCount) ." task".(($TaskCount != 1) ? "s" : "")); ?> currently running

# Queued Tasks

GetQueuedTaskList(50); $TaskCount = $GLOBALS["AF"]->GetTaskQueueSize(); print(number_format($TaskCount) ." task".(($TaskCount != 1) ? "s" : "")); ?> currently queued GetOrphanedTaskList(50); $TaskCount = count($Tasks); if ($TaskCount) { foreach ($Tasks as $TaskId => $Task) { $Tasks[$TaskId]["Links"] = array( "Que" => "index.php?P=TaskQueue&ID=" .$TaskId."&AC=REQUEUE", "Del" => "index.php?P=TaskQueue&ID=" .$TaskId."&AC=DELETE", "Run" => "index.php?P=TaskQueue&ID=" .$TaskId."&AC=RUN", ); } ?>

# Orphaned Tasks

currently orphaned

Task ID | Callback | Description | Priority | Started | Actions
--- | --- | --- | --- | --- | ---
$Task) { if (!is_array($Task["Callback"])) { $Callback = $Task["Callback"]; } else { if (is_object($Task["Callback"][0])) { if (get_class($Task["Callback"][0]) == "PluginCaller") { $Callback = $Task["Callback"][0]->GetCallbackAsText(); } else { $Callback = get_class($Task["Callback"][0])."::".$Task["Callback"][1]; } } else { $Callback = $Task["Callback"][0]."::".$Task["Callback"][1]; } } $Callback .= "("; if (is_array($Task["Parameters"])) { $Separator = ""; foreach ($Task["Parameters"] as $Parm) { $Callback .= $Separator; if (is_int($Parm) || is_float($Parm)) { $Callback .= $Parm; } elseif (is_string($Parm)) { $Callback .= "\"".htmlspecialchars($Parm)."\""; } elseif (is_array($Parm)) { $Callback .= "ARRAY"; } elseif (is_object($Parm)) { $Callback .= "OBJECT"; } elseif (is_null($Parm)) { $Callback .= "NULL"; } elseif (is_bool($Parm)) { $Callback .= $Parm ? "TRUE" : "FALSE"; } elseif (is_resource($Parm)) { $Callback .= get_resource_type($Parm); } else { $Callback .= "????"; } $Separator = ", "; } } $Callback .= ")"; $PriorityMapping = array( ApplicationFramework::PRIORITY_HIGH => "High", ApplicationFramework::PRIORITY_MEDIUM => "Medium", ApplicationFramework::PRIORITY_LOW => "Low", ApplicationFramework::PRIORITY_BACKGROUND => "Bkgrnd", ); $Priority = $PriorityMapping[$Task["Priority"]]; $Mouseover = ""; if (isset($Task["CrashInfo"])) { $CrashInfo = unserialize($Task["CrashInfo"]); if (isset($CrashInfo["LastError"])) { $Err = $CrashInfo["LastError"]; $File = preg_replace(":".getcwd()."/:", "", $Err["file"]); $Mouseover .= "ERROR: ".htmlspecialchars($Err["message"]) ."\nFILE: ".htmlspecialchars($File) ."\nLINE: ".$Err["line"]; } if (strlen($Mouseover)) { $Mouseover = " title=\"".$Mouseover."\""; } } ?>
> |  |  |  |  | $Link) { print($Separator."" ."".$Label.""); $Separator = " "; } ?>