include/SugarQueue/SugarJobQueue.php
\SugarJobQueue
Package: SugarCRM
Job queue driver
- Api
Properties
Methods

cleanup(
)
:
boolRemove old jobs that still are marked as running
Returns
| Type | Description |
|---|---|
| bool | true if no failed job discovered, false if some job were failed |

getJob(
string $jobId
)
:
\SugarJobGet Job object by ID
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $jobId | string |
| Type | Description |
|---|---|
| \SugarJob |

nextJob(
string $clientID
)
:
\SugarJobFetch the next job in the queue and mark it running
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $clientID | string | ID of the client requesting the job |
| Type | Description |
|---|---|
| \SugarJob |

postponeJob(
string $jobId, string $message
=
null, string $delay
=
null
)
:
boolRerun this job again
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $jobId | string | |
| $message | string | |
| $delay | string | how long to delay (default is job's delay) |
| Type | Description |
|---|---|
| bool |

resolveJob(
string $jobId, string $resolution, string $message
=
null
)
:
boolResolve job as success or failure
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $jobId | string | |
| $resolution | string | One of JOB_ constants that define job status |
| $message | string |
| Type | Description |
|---|---|
| bool |