/
githubmirror
/
framework
Обзор
Документация
Войти
/
githubmirror
/
framework
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
13.x
src/Illuminate/Queue/Jobs/FakeJob.php
94 строки
2 KB
Taylor Otwell
Revert "Use Str::uuid()->toString() instead of (string) casts (#60995)" (#61028)
04 авг 2026, 17:04
Не верифицирован
04 авг 2026, 17:04
68b8267
Код
Авторство
О чём код?
<?php namespace Illuminate\Queue\Jobs; use Illuminate\Contracts\Queue\Job as JobContract; use Illuminate\Support\Str; class FakeJob extends Job implements JobContract { /** * The number of seconds the released job was delayed. * * @var int */ public $releaseDelay; /** * The number of attempts made to process the job. * * @var int */ public $attempts = 1; /** * The exception the job failed with. * * @var \Throwable */ public $failedWith; /** * Get the job identifier. * * @return string */ public function getJobId() { return once(fn () => (string) Str::uuid()); } /** * Get the raw body of the job. * * @return string */ public function getRawBody() { return ''; } /** * Release the job back into the queue after (n) seconds. * * @param \DateTimeInterface|\DateInterval|int $delay * @return void */ public function release($delay = 0) { $this->released = true; $this->releaseDelay = $delay; } /** * Get the number of times the job has been attempted. * * @return int */ public function attempts() { return $this->attempts; } /** * Delete the job from the queue. * * @return void */ public function delete() { $this->deleted = true; } /** * Delete the job, call the "failed" method, and raise the failed job event. * * @param \Throwable|null $e * @return void */ public function fail($e = null) { $this->failed = true; $this->failedWith = $e; } }