diff --git a/app/Jobs/MovePipeline/MoveMigrateFollowersPipeline.php b/app/Jobs/MovePipeline/MoveMigrateFollowersPipeline.php index 8051d3d3..ba34b3fe 100644 --- a/app/Jobs/MovePipeline/MoveMigrateFollowersPipeline.php +++ b/app/Jobs/MovePipeline/MoveMigrateFollowersPipeline.php @@ -12,7 +12,7 @@ use GuzzleHttp\Client; use GuzzleHttp\Pool; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Queue\Queueable; -use Illuminate\Queue\Middleware\ThrottlesExceptions; +use Illuminate\Queue\Middleware\ThrottlesExceptionsWithRedis; use Illuminate\Queue\Middleware\WithoutOverlapping; class MoveMigrateFollowersPipeline implements ShouldQueue @@ -28,14 +28,21 @@ class MoveMigrateFollowersPipeline implements ShouldQueue * * @var int */ - public $tries = 6; + public $tries = 15; /** * The maximum number of unhandled exceptions to allow before failing. * * @var int */ - public $maxExceptions = 3; + public $maxExceptions = 5; + + /** + * The number of seconds the job can run before timing out. + * + * @var int + */ + public $timeout = 900; /** * Create a new job instance. @@ -55,7 +62,7 @@ class MoveMigrateFollowersPipeline implements ShouldQueue { return [ new WithoutOverlapping('process-move-migrate-followers:'.$this->target), - (new ThrottlesExceptions(2, 5 * 60))->backoff(5), + (new ThrottlesExceptionsWithRedis(5, 2 * 60))->backoff(1), ]; } @@ -64,7 +71,7 @@ class MoveMigrateFollowersPipeline implements ShouldQueue */ public function retryUntil(): DateTime { - return now()->addMinutes(5); + return now()->addMinutes(15); } /** diff --git a/app/Jobs/MovePipeline/ProcessMovePipeline.php b/app/Jobs/MovePipeline/ProcessMovePipeline.php index 864090c5..b96734f2 100644 --- a/app/Jobs/MovePipeline/ProcessMovePipeline.php +++ b/app/Jobs/MovePipeline/ProcessMovePipeline.php @@ -8,7 +8,7 @@ use DateTime; use Exception; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Queue\Queueable; -use Illuminate\Queue\Middleware\ThrottlesExceptions; +use Illuminate\Queue\Middleware\ThrottlesExceptionsWithRedis; use Illuminate\Queue\Middleware\WithoutOverlapping; use Illuminate\Support\Arr; use Log; @@ -26,14 +26,21 @@ class ProcessMovePipeline implements ShouldQueue * * @var int */ - public $tries = 6; + public $tries = 15; /** * The maximum number of unhandled exceptions to allow before failing. * * @var int */ - public $maxExceptions = 3; + public $maxExceptions = 5; + + /** + * The number of seconds the job can run before timing out. + * + * @var int + */ + public $timeout = 120; /** * Create a new job instance. @@ -53,7 +60,7 @@ class ProcessMovePipeline implements ShouldQueue { return [ new WithoutOverlapping('process-move:'.$this->target), - (new ThrottlesExceptions(2, 5 * 60))->backoff(5), + (new ThrottlesExceptionsWithRedis(5, 2 * 60))->backoff(1), ]; } @@ -62,7 +69,7 @@ class ProcessMovePipeline implements ShouldQueue */ public function retryUntil(): DateTime { - return now()->addMinutes(5); + return now()->addMinutes(10); } /** @@ -132,6 +139,8 @@ class ProcessMovePipeline implements ShouldQueue if (! $res || ! isset($res['movedTo']) || empty($res['movedTo'])) { Log::info('[AP][INBOX][MOVE] actor_movedTo failure'); + $payload = json_encode($res, JSON_PRETTY_PRINT); + Log::info($payload); return false; }