-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #88 from lilt/3.x-rework-on-queues-retry
Rework of queue retry logic
- Loading branch information
Showing
9 changed files
with
383 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
|
||
/** | ||
* @link https://github.com/lilt | ||
* @copyright Copyright (c) 2023 Lilt Devs | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace lilthq\craftliltplugin\modules; | ||
|
||
use craft\queue\BaseJob; | ||
|
||
abstract class AbstractRetryJob extends BaseJob | ||
{ | ||
/** | ||
* @var int | ||
*/ | ||
public $jobId; | ||
|
||
/** | ||
* @var int | ||
*/ | ||
public $attempt = 0; | ||
|
||
/** | ||
* | ||
* Is current job is eligible for retry | ||
* | ||
* @return bool | ||
*/ | ||
abstract public function canRetry(): bool; | ||
abstract public function getRetryJob(): BaseJob; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.