Implement high and low priority for queued tasks #2453

This commit is contained in:
Kijin Sung 2025-05-21 18:33:19 +09:00
parent 9ca2f79dce
commit 8014413163
5 changed files with 73 additions and 13 deletions

View file

@ -92,9 +92,10 @@ class Dummy implements QueueInterface
* @param string $handler
* @param ?object $args
* @param ?object $options
* @param ?string $priority
* @return int
*/
public function addTask(string $handler, ?object $args = null, ?object $options = null): int
public function addTask(string $handler, ?object $args = null, ?object $options = null, ?string $priority = null): int
{
$this->_dummy_queue = (object)[
'handler' => $handler,