You are here

public static function JobResult::failure in Advanced Queue 8

Constructs a failure result.

The job type's default retry behavior can be overridden by passing custom $max_retries and $retry_delay values to this method.

Parameters

string $message: The message. Optional.

int $max_retries: The maximum number of times. Optional.

int $retry_delay: The retry delay, in seconds. Optional.

Return value

static

4 calls to JobResult::failure()
JobResultTest::testFailure in tests/src/Unit/JobResultTest.php
@covers ::failure @covers ::getState @covers ::getMessage @covers ::getMaxRetries @covers ::getRetryDelay
JobResultTest::testFailureWithRetryOverride in tests/src/Unit/JobResultTest.php
@covers ::failure @covers ::getState @covers ::getMessage @covers ::getMaxRetries @covers ::getRetryDelay
Processor::processJob in src/Processor.php
Processes the given job.
Retry::process in tests/modules/advancedqueue_test/src/Plugin/AdvancedQueue/JobType/Retry.php
Processes the given job.

File

src/JobResult.php, line 86

Class

JobResult
Represents a job result.

Namespace

Drupal\advancedqueue

Code

public static function failure($message = '', $max_retries = NULL, $retry_delay = NULL) {
  return new static(Job::STATE_FAILURE, $message, $max_retries, $retry_delay);
}