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 @@ -15,9 +15,6 @@ use InteractsWithQueue; use Queueable; - /** @var int The number of seconds to wait before retrying the job. */ - public $backoff = 10; - /** @var int How many times retry the job if it fails. */ public $tries = 5; @@ -39,6 +36,16 @@ $this->walletId = $walletId; } + /** + * Number of seconds to wait before retrying the job. + * + * @return array + */ + public function backoff(): array + { + return [10, 30, 60, 120]; + } + /** * 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 @@ -23,9 +23,6 @@ public const THRESHOLD_BEFORE_REMINDER = 'before-reminder'; public const THRESHOLD_INITIAL = 'initial'; - /** @var int The number of seconds to wait before retrying the job. */ - public $backoff = 10; - /** @var int How many times retry the job if it fails. */ public $tries = 5; @@ -51,6 +48,16 @@ $this->walletId = $walletId; } + /** + * Number of seconds to wait before retrying the job. + * + * @return array + */ + public function backoff(): array + { + return [10, 30, 60, 120, 300]; + } + /** * Execute the job. *