Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117862773
D5108.1775320122.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D5108.1775320122.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D5108: Use incrementing retry interval (backoff) in all jobs
Attached
Detach File
Event Timeline