mirror of
https://github.com/appwrite/appwrite
synced 2026-05-24 09:28:40 +00:00
Merge pull request #7991 from appwrite/chore-queue-retry-update
Chore: queue retry update
This commit is contained in:
commit
f97f24eb16
2 changed files with 4 additions and 28 deletions
|
|
@ -7,6 +7,7 @@ use Utopia\CLI\Console;
|
||||||
use Utopia\Platform\Action;
|
use Utopia\Platform\Action;
|
||||||
use Utopia\Queue\Client;
|
use Utopia\Queue\Client;
|
||||||
use Utopia\Queue\Connection;
|
use Utopia\Queue\Connection;
|
||||||
|
use Utopia\Validator\Text;
|
||||||
use Utopia\Validator\WhiteList;
|
use Utopia\Validator\WhiteList;
|
||||||
|
|
||||||
class QueueCount extends Action
|
class QueueCount extends Action
|
||||||
|
|
@ -21,20 +22,7 @@ class QueueCount extends Action
|
||||||
{
|
{
|
||||||
$this
|
$this
|
||||||
->desc('Return the number of from a specific queue identified by the name parameter with a specific type')
|
->desc('Return the number of from a specific queue identified by the name parameter with a specific type')
|
||||||
->param('name', '', new WhiteList([
|
->param('name', '', new Text(100), 'Queue name')
|
||||||
Event::DATABASE_QUEUE_NAME,
|
|
||||||
Event::DELETE_QUEUE_NAME,
|
|
||||||
Event::AUDITS_QUEUE_NAME,
|
|
||||||
Event::MAILS_QUEUE_NAME,
|
|
||||||
Event::FUNCTIONS_QUEUE_NAME,
|
|
||||||
Event::USAGE_QUEUE_NAME,
|
|
||||||
Event::WEBHOOK_QUEUE_NAME,
|
|
||||||
Event::CERTIFICATES_QUEUE_NAME,
|
|
||||||
Event::BUILDS_QUEUE_NAME,
|
|
||||||
Event::MESSAGING_QUEUE_NAME,
|
|
||||||
Event::MIGRATIONS_QUEUE_NAME,
|
|
||||||
Event::HAMSTER_QUEUE_NAME
|
|
||||||
]), 'Queue name')
|
|
||||||
->param('type', '', new WhiteList([
|
->param('type', '', new WhiteList([
|
||||||
'success',
|
'success',
|
||||||
'failed',
|
'failed',
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ use Utopia\Platform\Action;
|
||||||
use Utopia\Queue\Client;
|
use Utopia\Queue\Client;
|
||||||
use Utopia\Queue\Connection;
|
use Utopia\Queue\Connection;
|
||||||
use Utopia\Validator\Integer;
|
use Utopia\Validator\Integer;
|
||||||
|
use Utopia\Validator\Text;
|
||||||
use Utopia\Validator\WhiteList;
|
use Utopia\Validator\WhiteList;
|
||||||
use Utopia\Validator\Wildcard;
|
use Utopia\Validator\Wildcard;
|
||||||
|
|
||||||
|
|
@ -23,20 +24,7 @@ class QueueRetry extends Action
|
||||||
{
|
{
|
||||||
$this
|
$this
|
||||||
->desc('Retry failed jobs from a specific queue identified by the name parameter')
|
->desc('Retry failed jobs from a specific queue identified by the name parameter')
|
||||||
->param('name', '', new WhiteList([
|
->param('name', '', new Text(100), 'Queue name')
|
||||||
Event::DATABASE_QUEUE_NAME,
|
|
||||||
Event::DELETE_QUEUE_NAME,
|
|
||||||
Event::AUDITS_QUEUE_NAME,
|
|
||||||
Event::MAILS_QUEUE_NAME,
|
|
||||||
Event::FUNCTIONS_QUEUE_NAME,
|
|
||||||
Event::USAGE_QUEUE_NAME,
|
|
||||||
Event::WEBHOOK_CLASS_NAME,
|
|
||||||
Event::CERTIFICATES_QUEUE_NAME,
|
|
||||||
Event::BUILDS_QUEUE_NAME,
|
|
||||||
Event::MESSAGING_QUEUE_NAME,
|
|
||||||
Event::MIGRATIONS_QUEUE_NAME,
|
|
||||||
Event::HAMSTER_CLASS_NAME
|
|
||||||
]), 'Queue name')
|
|
||||||
->param('limit', 0, new Wildcard(), 'jobs limit', true)
|
->param('limit', 0, new Wildcard(), 'jobs limit', true)
|
||||||
->inject('queue')
|
->inject('queue')
|
||||||
->callback(fn ($name, $limit, $queue) => $this->action($name, $limit, $queue));
|
->callback(fn ($name, $limit, $queue) => $this->action($name, $limit, $queue));
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue