JobsManagerUtil Class Reference

Static Public Member Functions

static runFromJobManagerCommandOrBrowser ($type, $timeLimit, $messageLoggerClassName, &$isJobInProgress, $useMessageStreamer=true, $template="{message}\n", $lineBreak="\n")
static runMonitorJob (MessageLogger $messageLogger, &$isJobInProgress)
static makeMonitorStuckJobNotification ()
static runNonMonitorJob ($type, MessageLogger $messageLogger, &$isJobInProgress)
static isJobInProcessOverThreshold (JobInProcess $jobInProcess, $type)

Static Protected Member Functions

static getLocalizedDateTimeTimeZoneString ()

Detailed Description

A helper class for running normal jobs or the monitor job.

Definition at line 40 of file JobsManagerUtil.php.


Member Function Documentation

static runFromJobManagerCommandOrBrowser ( type,
timeLimit,
messageLoggerClassName,
&$  isJobInProgress,
useMessageStreamer = true,
template = "{message}\n",
lineBreak = "\n" 
) [static]
See also:
JobManagerCommand. This method is called from the JobManagerCommand which is a commandline tool to run jobs. Based on the 'type' specified this method will call to run the monitor or a regular non-monitor job.
Parameters:
$type 
$timeLimit 
$messageLoggerClassName 
$isJobInProgress 
bool $useMessageStreamer
string $template
string $lineBreak

Definition at line 54 of file JobsManagerUtil.php.

static runMonitorJob ( MessageLogger messageLogger,
&$  isJobInProgress 
) [static]
Parameters:
MessageLogger $messageLogger
$isJobInProgress 

Definition at line 124 of file JobsManagerUtil.php.

static runNonMonitorJob ( type,
MessageLogger messageLogger,
&$  isJobInProgress 
) [static]

Given a 'type' of job, run the job. This is for non-monitor jobs only.

Parameters:
$type 
MessageLogger $messageLogger
$isJobInProgress 
Exceptions:
FailedToSaveModelException 

Definition at line 186 of file JobsManagerUtil.php.

static isJobInProcessOverThreshold ( JobInProcess jobInProcess,
type 
) [static]

Given a model of a jobInProcess and the 'type' of job, determine if the job has been running too long. Jobs have defined maximum run times that they are allowed to be in process.

Parameters:
JobInProcess $jobInProcess
string $type
Returns:
true/false - true if the job is over the allowed amount of time to run for.

Definition at line 244 of file JobsManagerUtil.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Sat Oct 21 07:10:26 2017