Page MenuHomePhorge

D5108.1775320122.diff
No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None

D5108.1775320122.diff

diff --git a/src/app/Jobs/CommonJob.php b/src/app/Jobs/CommonJob.php
--- a/src/app/Jobs/CommonJob.php
+++ b/src/app/Jobs/CommonJob.php
@@ -8,13 +8,8 @@
use Illuminate\Queue\InteractsWithQueue;
/**
- * The abstract \App\Jobs\DomainJob implements the logic needed for all dispatchable Jobs related to
- * \App\Domain objects.
- *
- * ```php
- * $job = new \App\Jobs\Domain\CreateJob($domainId);
- * $job->handle();
- * ```
+ * The abstract class implementing the logic needed for all dispatchable Jobs.
+ * Includes default retry configuration.
*/
abstract class CommonJob implements ShouldQueue
{
@@ -48,7 +43,7 @@
*
* @var int
*/
- public $tries = 5;
+ public $tries = 3;
/**
* Execute the job.
@@ -57,6 +52,16 @@
*/
abstract public function handle();
+ /**
+ * Number of seconds to wait before retrying the job.
+ *
+ * @return array<int, int>
+ */
+ public function backoff(): array
+ {
+ return [5, 15, 30, 60, 120];
+ }
+
/**
* Delete the job from the queue.
*

File Metadata

Mime Type
text/plain
Expires
Sat, Apr 4, 4:28 PM (18 h, 46 s ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18830371
Default Alt Text
D5108.1775320122.diff (1 KB)

Event Timeline