Page MenuHomePhorge

D5124.1775269266.diff
No OneTemporary

Authored By
Unknown
Size
5 KB
Referenced Files
None
Subscribers
None

D5124.1775269266.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
@@ -43,7 +43,7 @@
*
* @var int
*/
- public $tries = 3;
+ public $tries = 24;
/**
* Execute the job.
@@ -59,7 +59,7 @@
*/
public function backoff(): array
{
- return [5, 15, 30, 60, 120];
+ return [5, 15, 60, 300, 3600];
}
/**
@@ -147,7 +147,7 @@
/**
* Log human-readable job title (at least contains job class name)
*/
- public function logJobStart($ident = null): void
+ protected function logJobStart($ident = null): void
{
\Log::info('Starting ' . $this::class . ($ident ? " for {$ident}" : ''));
}
diff --git a/src/app/Jobs/IMAP/AclCleanupJob.php b/src/app/Jobs/IMAP/AclCleanupJob.php
--- a/src/app/Jobs/IMAP/AclCleanupJob.php
+++ b/src/app/Jobs/IMAP/AclCleanupJob.php
@@ -30,6 +30,9 @@
*/
public $timeout = 60 * 60;
+ /** @var int The number of tries for this Job. */
+ public $tries = 3;
+
/**
* Create a new job instance.
diff --git a/src/app/Jobs/Mail/PasswordRetentionJob.php b/src/app/Jobs/Mail/PasswordRetentionJob.php
--- a/src/app/Jobs/Mail/PasswordRetentionJob.php
+++ b/src/app/Jobs/Mail/PasswordRetentionJob.php
@@ -6,9 +6,6 @@
class PasswordRetentionJob extends \App\Jobs\MailJob
{
- /** @var int The number of seconds to wait before retrying the job. */
- public $backoff = 30;
-
/** @var string Password expiration date */
protected $expiresOn;
diff --git a/src/app/Jobs/Mail/PaymentJob.php b/src/app/Jobs/Mail/PaymentJob.php
--- a/src/app/Jobs/Mail/PaymentJob.php
+++ b/src/app/Jobs/Mail/PaymentJob.php
@@ -7,9 +7,6 @@
class PaymentJob extends \App\Jobs\MailJob
{
- /** @var int The number of seconds to wait before retrying the job. */
- public $backoff = 30;
-
/** @var \App\Payment A payment object */
protected $payment;
diff --git a/src/app/Jobs/Mail/PaymentMandateDisabledJob.php b/src/app/Jobs/Mail/PaymentMandateDisabledJob.php
--- a/src/app/Jobs/Mail/PaymentMandateDisabledJob.php
+++ b/src/app/Jobs/Mail/PaymentMandateDisabledJob.php
@@ -8,9 +8,6 @@
class PaymentMandateDisabledJob extends \App\Jobs\MailJob
{
- /** @var int The number of seconds to wait before retrying the job. */
- public $backoff = 30;
-
/** @var \App\Wallet A wallet object */
protected $wallet;
diff --git a/src/app/Jobs/Mail/TrialEndJob.php b/src/app/Jobs/Mail/TrialEndJob.php
--- a/src/app/Jobs/Mail/TrialEndJob.php
+++ b/src/app/Jobs/Mail/TrialEndJob.php
@@ -7,9 +7,6 @@
class TrialEndJob extends \App\Jobs\MailJob
{
- /** @var int The number of seconds to wait before retrying the job. */
- public $backoff = 30;
-
/** @var \App\User The account owner */
protected $account;
diff --git a/src/app/Jobs/MailJob.php b/src/app/Jobs/MailJob.php
--- a/src/app/Jobs/MailJob.php
+++ b/src/app/Jobs/MailJob.php
@@ -12,13 +12,20 @@
use SerializesModels;
/** @var int The number of times the job may be attempted. */
- public $tries = 3;
-
- /** @var int The number of seconds to wait before retrying the job. */
- public $backoff = 10;
+ public $tries = 5;
/** @var bool Delete the job if its models no longer exist. */
public $deleteWhenMissingModels = true;
public const QUEUE = 'mail';
+
+ /**
+ * Number of seconds to wait before retrying the job.
+ *
+ * @return array<int, int>
+ */
+ public function backoff(): array
+ {
+ return [10, 120, 600, 3600];
+ }
}
diff --git a/src/app/Jobs/WalletCharge.php b/src/app/Jobs/WalletCharge.php
--- a/src/app/Jobs/WalletCharge.php
+++ b/src/app/Jobs/WalletCharge.php
@@ -30,16 +30,6 @@
$this->onQueue(self::QUEUE);
}
- /**
- * Number of seconds to wait before retrying the job.
- *
- * @return array<int, int>
- */
- public function backoff(): array
- {
- return [10, 30, 60, 120, 300];
- }
-
/**
* Execute the job.
*
diff --git a/src/app/Jobs/WalletCheck.php b/src/app/Jobs/WalletCheck.php
--- a/src/app/Jobs/WalletCheck.php
+++ b/src/app/Jobs/WalletCheck.php
@@ -40,16 +40,6 @@
$this->onQueue(self::QUEUE);
}
- /**
- * Number of seconds to wait before retrying the job.
- *
- * @return array<int, int>
- */
- public function backoff(): array
- {
- return [10, 30, 60, 120, 300];
- }
-
/**
* Execute the job.
*
diff --git a/src/config/horizon.php b/src/config/horizon.php
--- a/src/config/horizon.php
+++ b/src/config/horizon.php
@@ -1,5 +1,12 @@
<?php
+// Prioritized list of all queues
+$queues = [
+ 'default',
+ App\Jobs\MailJob::QUEUE,
+ App\Jobs\WalletCheck::QUEUE,
+];
+
return [
/*
@@ -144,7 +151,7 @@
'production' => [
'supervisor-1' => [
'connection' => 'redis',
- 'queue' => ['default', App\Jobs\MailJob::QUEUE, 'background'],
+ 'queue' => $queues,
'balance' => 'auto',
'maxProcesses' => 1,
'minProcesses' => 1,
@@ -155,7 +162,7 @@
'local' => [
'supervisor-1' => [
'connection' => 'redis',
- 'queue' => ['default', App\Jobs\MailJob::QUEUE, 'background'],
+ 'queue' => $queues,
'balance' => 'auto',
'maxProcesses' => 1,
'minProcesses' => 1,

File Metadata

Mime Type
text/plain
Expires
Sat, Apr 4, 2:21 AM (15 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18827761
Default Alt Text
D5124.1775269266.diff (5 KB)

Event Timeline