-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support client side rate limiting (#20)
* chore: add retry interfaces * 🚧 chore: setup support client side rate limiting * chore: add comments, check for delay seconds * 💚 ci: update workflow file * 🔧 chore: add changes to api workflows * 🧪 actually run events retry test the test had been silently failing in the background because the queue consumer started did not have the di preference overriden for Config to TestConfig. because that always happened in a separate process, it never came to light that we weren't actually asserting that retries had been performed in the background.
- Loading branch information
Showing
14 changed files
with
182 additions
and
44 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace MageOS\AsyncEvents\Api\Data; | ||
|
||
interface ResultInterface | ||
{ | ||
/** | ||
* Getter for is_successful | ||
* | ||
* @return bool | ||
*/ | ||
public function getIsSuccessful(): bool; | ||
|
||
/** | ||
* Setter for is_successful | ||
* | ||
* @param bool $isSuccessful | ||
* @return void | ||
*/ | ||
public function setIsSuccessful(bool $isSuccessful): void; | ||
|
||
/** | ||
* Getter for is_retryable | ||
* | ||
* @return bool | ||
*/ | ||
public function getIsRetryable(): bool; | ||
|
||
/** | ||
* Setter for is_retryable | ||
* | ||
* @param bool $isRetryable | ||
* @return void | ||
*/ | ||
public function setIsRetryable(bool $isRetryable): void; | ||
|
||
/** | ||
* Getter for retry_after | ||
* | ||
* @return int|null | ||
*/ | ||
public function getRetryAfter(): ?int; | ||
|
||
/** | ||
* Setter for retry_after | ||
* | ||
* @param int $retryAfter | ||
* @return void | ||
*/ | ||
public function setRetryAfter(int $retryAfter): void; | ||
} |
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,12 @@ | ||
<?php | ||
|
||
namespace MageOS\AsyncEvents\Api; | ||
|
||
interface RetryManagementInterface | ||
{ | ||
public function init(int $subscriptionId, mixed $data, string $uuid): void; | ||
|
||
public function place(int $deathCount, int $subscriptionId, mixed $data, string $uuid, ?int $backoff): void; | ||
|
||
public function kill(int $subscriptionId, mixed $data): void; | ||
} |
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
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.