All Data Structures Functions Variables Pages
Static Public Member Functions | Static Protected Member Functions
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 139 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 201 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 259 of file JobsManagerUtil.php.


The documentation for this class was generated from the following file:
Generated on Wed Apr 8 2020 07:10:59