include/SugarQueue/SugarCronRemoteJobs.php

Show: inherited
Table of Contents

\SugarCronRemoteJobs

Package: SugarCRM

CRON driver for job queue that ships jobs outside

Parent(s)
\SugarCronJobs
Api
 

Properties

Propertyprotectedstring  $client= ''

REST client

Details
Type
string
Propertypublicbool  $disable_schedulers= 'false'
inherited

This allows to disable schedulers cycle, e.g. for testing

Inherited from: \SugarCronJobs::$$disable_schedulers
Default valuefalseDetails
Type
bool
Inherited_from
\SugarCronJobs::$$disable_schedulers  
Propertypublic\SchedulersJob  $job= ''
inherited

Currently running job

Inherited from: \SugarCronJobs::$$job
Details
Type
\SchedulersJob
Inherited_from
\SugarCronJobs::$$job  
Propertyprotectedstring  $jobserver= ''

URL for remote job server

Details
Type
string
Propertypublicstring  $lockfile= ''
inherited

Lock file to ensure the jobs aren't run too fast

Inherited from: \SugarCronJobs::$$lockfile
Details
Type
string
Inherited_from
\SugarCronJobs::$$lockfile  
Propertypublicint  $max_jobs= '10'
inherited

Max number of jobs per cron run

Inherited from: \SugarCronJobs::$$max_jobs
Default value10Details
Type
int
Inherited_from
\SugarCronJobs::$$max_jobs  
Propertypublicint  $max_runtime= '60'
inherited

Max time per cron run

Inherited from: \SugarCronJobs::$$max_runtime
Default value60Details
Type
int
Inherited_from
\SugarCronJobs::$$max_runtime  
Propertypublicint  $min_interval= '30'
inherited

Min time between cron runs

Inherited from: \SugarCronJobs::$$min_interval
Default value30Details
Type
int
Inherited_from
\SugarCronJobs::$$min_interval  
Propertypublicbool  $runOk= 'true'
inherited

Is current queue run OK?

Inherited from: \SugarCronJobs::$$runOk
Default valuetrueDetails
Type
bool
Inherited_from
\SugarCronJobs::$$runOk  
Propertyprotectedstring  $submitURL= '"submitJob"'

Just in case we'd ever need to override...

Default value"submitJob"Details
Type
string
Propertypublicbool  $verbose= 'false'
inherited

Should the driver print reports to stdout?

Inherited from: \SugarCronJobs::$$verbose
Default valuefalseDetails
Type
bool
Inherited_from
\SugarCronJobs::$$verbose  

Methods

methodpublic__construct( ) : void

methodpublicexecuteJob( \SchedulersJob $job ) : void

Execute given job

Parameters
Name Type Description
$job \SchedulersJob
methodpublicgetMyId( ) : string

Return ID for this client

Returns
Type Description
string
methodprotectedjobFailed( \SchedulersJob $job = null ) : void
inherited

What to do if one of the jobs failed

Inherited from: \SugarCronJobs::jobFailed()
Parameters
Name Type Description
$job \SchedulersJob
methodprotectedmarkLastRun( ) : void
inherited

Remember last time it was run

Inherited from: \SugarCronJobs::markLastRun()
methodpublicrunCycle( ) : void
inherited

Run CRON cycle: - cleanup - schedule new jobs - execute pending jobs

Inherited from: \SugarCronJobs::runCycle()
methodpublicrunOk( ) : void
inherited

Check if the queue run was fine

Inherited from: \SugarCronJobs::runOk()
methodpublicsetClient( \SugarHttpClient $client ) : void

Set client to talk to SNIP

Parameters
Name Type Description
$client \SugarHttpClient
methodpublicthrottle( ) : bool
inherited

Check if we aren't running jobs too frequently

Inherited from: \SugarCronJobs::throttle()
Returns
Type Description
bool OK to run?
methodpublicunexpectedExit( ) : void
inherited

Shutdown handler to be called if something breaks in the middle of the job

Inherited from: \SugarCronJobs::unexpectedExit()
Documentation was generated by DocBlox 0.18.1.