mirror of
https://github.com/elyby/accounts.git
synced 2025-05-31 14:11:46 +05:30
Implemented oauth session revocation notification.
Reworked webhooks notifications constructors
This commit is contained in:
@@ -16,39 +16,18 @@ use yii\queue\RetryableJobInterface;
|
||||
|
||||
class DeliveryWebHook implements RetryableJobInterface {
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $type;
|
||||
public string $type;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $url;
|
||||
public string $url;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
public $secret;
|
||||
public ?string $secret;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
public $payloads;
|
||||
public array $payloads;
|
||||
|
||||
/**
|
||||
* @return int time to reserve in seconds
|
||||
*/
|
||||
public function getTtr(): int {
|
||||
return 65;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $attempt number
|
||||
* @param \Exception|\Throwable $error from last execute of the job
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function canRetry($attempt, $error): bool {
|
||||
if ($attempt >= 5) {
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user