class Job

Constants

STATE_NEW

State if job is inserted, but not yet ready to be started.

STATE_PENDING

State if job is inserted, and might be started.

It is important to note that this does not automatically mean that all jobs of this state can actually be started, but you have to check isStartable() to be absolutely sure.

In contrast to NEW, jobs of this state at least might be started, while jobs of state NEW never are allowed to be started.

STATE_CANCELED

State if job was never started, and will never be started.

STATE_RUNNING

State if job was started and has not exited, yet.

STATE_FINISHED

State if job exists with a successful exit code.

STATE_FAILED

State if job exits with a non-successful exit code.

STATE_TERMINATED

State if job exceeds its configured maximum runtime.

STATE_INCOMPLETE

State if an error occurs in the runner command.

The runner command is the command that actually launches the individual jobs. If instead an error occurs in the job command, this will result in a state of FAILED.

DEFAULT_QUEUE

State if an error occurs in the runner command.

The runner command is the command that actually launches the individual jobs. If instead an error occurs in the job command, this will result in a state of FAILED.

MAX_QUEUE_LENGTH

PRIORITY_LOW

PRIORITY_DEFAULT

PRIORITY_HIGH

Methods

static 
create($command, array $args = array(), $confirmed = true, $queue = self::DEFAULT_QUEUE, $priority = self::PRIORITY_DEFAULT)

No description

static 
isNonSuccessfulFinalState($state)

No description

static 
getStates()

No description

__construct($command, array $args = array(), $confirmed = true, $queue = self::DEFAULT_QUEUE, $priority = self::PRIORITY_DEFAULT)

No description

__clone()

No description

getId()

No description

getState()

No description

setWorkerName($workerName)

No description

getWorkerName()

No description

getPriority()

No description

isInFinalState()

No description

isStartable()

No description

setState($newState)

No description

getCreatedAt()

No description

getClosedAt()

No description

getExecuteAfter()

No description

setExecuteAfter(DateTime $executeAfter)

No description

getCommand()

No description

getArgs()

No description

getRelatedEntities()

No description

isClosedNonSuccessful()

No description

findRelatedEntity($class)

No description

addRelatedEntity($entity)

No description

getDependencies()

No description

hasDependency(Job $job)

No description

addDependency(Job $job)

No description

getRuntime()

No description

setRuntime($time)

No description

getMemoryUsage()

No description

getMemoryUsageReal()

No description

addOutput($output)

No description

addErrorOutput($output)

No description

setOutput($output)

No description

setErrorOutput($output)

No description

getOutput()

No description

getErrorOutput()

No description

setExitCode($code)

No description

getExitCode()

No description

setMaxRuntime($time)

No description

getMaxRuntime()

No description

getStartedAt()

No description

getMaxRetries()

No description

setMaxRetries($tries)

No description

isRetryAllowed()

No description

getOriginalJob()

No description

setOriginalJob(Job $job)

No description

addRetryJob(Job $job)

No description

getRetryJobs()

No description

isRetryJob()

No description

isRetried()

No description

checked()

No description

getCheckedAt()

No description

setStackTrace(FlattenException $ex)

No description

getStackTrace()

No description

getQueue()

No description

isNew()

No description

isPending()

No description

isCanceled()

No description

isRunning()

No description

isTerminated()

No description

isFailed()

No description

isFinished()

No description

isIncomplete()

No description

__toString()

No description

Details

at line 181
static create($command, array $args = array(), $confirmed = true, $queue = self::DEFAULT_QUEUE, $priority = self::PRIORITY_DEFAULT)

Parameters

$command
array $args
$confirmed
$queue
$priority

at line 186
static isNonSuccessfulFinalState($state)

Parameters

$state

at line 191
static getStates()

at line 205
__construct($command, array $args = array(), $confirmed = true, $queue = self::DEFAULT_QUEUE, $priority = self::PRIORITY_DEFAULT)

Parameters

$command
array $args
$confirmed
$queue
$priority

at line 227
__clone()

at line 245
getId()

at line 250
getState()

at line 255
setWorkerName($workerName)

Parameters

$workerName

at line 260
getWorkerName()

at line 265
getPriority()

at line 270
isInFinalState()

at line 275
isStartable()

at line 286
setState($newState)

Parameters

$newState

at line 340
getCreatedAt()

at line 345
getClosedAt()

at line 350
getExecuteAfter()

at line 355
setExecuteAfter(DateTime $executeAfter)

Parameters

DateTime $executeAfter

at line 360
getCommand()

at line 365
getArgs()

at line 370
getRelatedEntities()

at line 375
isClosedNonSuccessful()

at line 380
findRelatedEntity($class)

Parameters

$class

at line 391
addRelatedEntity($entity)

Parameters

$entity

at line 404
getDependencies()

at line 409
hasDependency(Job $job)

Parameters

Job $job

at line 414
addDependency(Job $job)

Parameters

Job $job

at line 427
getRuntime()

at line 432
setRuntime($time)

Parameters

$time

at line 437
getMemoryUsage()

at line 442
getMemoryUsageReal()

at line 447
addOutput($output)

Parameters

$output

at line 452
addErrorOutput($output)

Parameters

$output

at line 457
setOutput($output)

Parameters

$output

at line 462
setErrorOutput($output)

Parameters

$output

at line 467
getOutput()

at line 472
getErrorOutput()

at line 477
setExitCode($code)

Parameters

$code

at line 482
getExitCode()

at line 487
setMaxRuntime($time)

Parameters

$time

at line 492
getMaxRuntime()

at line 497
getStartedAt()

at line 502
getMaxRetries()

at line 507
setMaxRetries($tries)

Parameters

$tries

at line 512
isRetryAllowed()

at line 523
getOriginalJob()

at line 532
setOriginalJob(Job $job)

Parameters

Job $job

at line 545
addRetryJob(Job $job)

Parameters

Job $job

at line 555
getRetryJobs()

at line 560
isRetryJob()

at line 565
isRetried()

at line 578
checked()

at line 583
getCheckedAt()

at line 588
setStackTrace(FlattenException $ex)

Parameters

FlattenException $ex

at line 593
getStackTrace()

at line 598
getQueue()

at line 603
isNew()

at line 608
isPending()

at line 613
isCanceled()

at line 618
isRunning()

at line 623
isTerminated()

at line 628
isFailed()

at line 633
isFinished()

at line 638
isIncomplete()

at line 643
__toString()