public function Database::onFailure in Advanced Queue 8
Called when job processing has failed.
Non-SQL backends that wish to preserve failed jobs can use this method to populate a failure/dead-letter queue.
Parameters
\Drupal\advancedqueue\Job $job: The job.
Overrides BackendInterface::onFailure
File
- src/
Plugin/ AdvancedQueue/ Backend/ Database.php, line 223
Class
- Database
- Provides the database queue backend.
Namespace
Drupal\advancedqueue\Plugin\AdvancedQueue\BackendCode
public function onFailure(Job $job) {
$job
->setProcessedTime($this->time
->getCurrentTime());
$this
->updateJob($job);
}