mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 11:11:39 +09:00
Add placeholder methods to dummy queue driver
This commit is contained in:
parent
ffeb9133ab
commit
b21b700570
1 changed files with 50 additions and 0 deletions
|
|
@ -104,6 +104,34 @@ class Dummy implements QueueInterface
|
|||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a task to be executed at a specific time.
|
||||
*
|
||||
* @param int $time
|
||||
* @param string $handler
|
||||
* @param ?object $args
|
||||
* @param ?object $options
|
||||
* @return int
|
||||
*/
|
||||
public function addTaskAt(int $time, string $handler, ?object $args = null, ?object $options = null): int
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a task to be executed at an interval.
|
||||
*
|
||||
* @param string $interval
|
||||
* @param string $handler
|
||||
* @param ?object $args
|
||||
* @param ?object $options
|
||||
* @return int
|
||||
*/
|
||||
public function addTaskAtInterval(string $interval, string $handler, ?object $args = null, ?object $options = null): int
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the next task from the queue.
|
||||
*
|
||||
|
|
@ -116,4 +144,26 @@ class Dummy implements QueueInterface
|
|||
$this->_dummy_queue = null;
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get scheduled tasks.
|
||||
*
|
||||
* @param string $type
|
||||
* @return array
|
||||
*/
|
||||
public function getScheduledTasks(string $type): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the last executed timestamp of a scheduled task.
|
||||
*
|
||||
* @param object $task
|
||||
* @return void
|
||||
*/
|
||||
public function updateLastRunTimestamp(object $task): void
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue