mirror of
https://github.com/idanoo/php-resque
synced 2025-07-01 21:52:21 +00:00
v2.5.0 - Update packages/docs
This commit is contained in:
parent
81fe761577
commit
e3ac97920c
8 changed files with 74 additions and 57 deletions
|
@ -22,6 +22,7 @@ class Event
|
|||
*
|
||||
* @param string $event Name of event to be raised.
|
||||
* @param mixed $data Optional, any data that should be passed to each callback.
|
||||
*
|
||||
* @return true
|
||||
*/
|
||||
public static function trigger($event, $data = null)
|
||||
|
@ -49,7 +50,8 @@ class Event
|
|||
* Listen in on a given event to have a specified callback fired.
|
||||
*
|
||||
* @param string $event Name of event to listen on.
|
||||
* @param mixed $callback Any callback callable by call_user_func_array.
|
||||
* @param mixed $callback Any callback callable by call_user_func_array
|
||||
*
|
||||
* @return true
|
||||
*/
|
||||
public static function listen($event, $callback)
|
||||
|
@ -67,6 +69,7 @@ class Event
|
|||
*
|
||||
* @param string $event Name of event.
|
||||
* @param mixed $callback The callback as defined when listen() was called.
|
||||
*
|
||||
* @return true
|
||||
*/
|
||||
public static function stopListening($event, $callback)
|
||||
|
@ -85,8 +88,10 @@ class Event
|
|||
|
||||
/**
|
||||
* Call all registered listeners.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function clearListeners()
|
||||
public static function clearListeners(): void
|
||||
{
|
||||
self::$events = [];
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@ namespace Resque\Job;
|
|||
* @author Daniel Mason <daniel@m2.nz>
|
||||
* @license http://www.opensource.org/licenses/mit-license.php
|
||||
*/
|
||||
|
||||
class Factory implements FactoryInterface
|
||||
{
|
||||
public ?Job $job;
|
||||
|
@ -16,6 +17,8 @@ class Factory implements FactoryInterface
|
|||
public array $args;
|
||||
|
||||
/**
|
||||
* Create job factory
|
||||
*
|
||||
* @param $className
|
||||
* @param array $args
|
||||
* @param $queue
|
||||
|
|
|
@ -97,17 +97,6 @@ class Redis
|
|||
'rename',
|
||||
'rpoplpush'
|
||||
];
|
||||
// sinterstore
|
||||
// sunion
|
||||
// sunionstore
|
||||
// sdiff
|
||||
// sdiffstore
|
||||
// sinter
|
||||
// smove
|
||||
// mget
|
||||
// msetnx
|
||||
// mset
|
||||
// renamenx
|
||||
|
||||
/**
|
||||
* Set Redis namespace (prefix) default: resque
|
||||
|
|
|
@ -12,7 +12,7 @@ namespace Resque;
|
|||
|
||||
class Resque
|
||||
{
|
||||
public const VERSION = '2.3.0';
|
||||
public const VERSION = '2.5.0';
|
||||
|
||||
public const DEFAULT_INTERVAL = 5;
|
||||
|
||||
|
|
|
@ -97,6 +97,7 @@ class Worker
|
|||
foreach ($workers as $workerId) {
|
||||
$instances[] = self::find($workerId);
|
||||
}
|
||||
|
||||
return $instances;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue