mirror of
https://github.com/idanoo/php-resque
synced 2025-07-05 15:42:20 +00:00
2.0.3 (2022-09-12)
- Update composer packages - Added WoodpeckerCI tests - Updated links in composer package - Stricter typing
This commit is contained in:
parent
f9a22e7b8a
commit
05cae402b5
21 changed files with 215 additions and 524 deletions
|
@ -15,7 +15,9 @@ class Factory implements FactoryInterface
|
|||
* @param $className
|
||||
* @param array $args
|
||||
* @param $queue
|
||||
*
|
||||
* @return \Resque\Job\JobInterface
|
||||
*
|
||||
* @throws \Resque\Exception
|
||||
*/
|
||||
public function create($className, $args, $queue)
|
||||
|
@ -28,13 +30,14 @@ class Factory implements FactoryInterface
|
|||
|
||||
if (!method_exists($className, 'perform')) {
|
||||
throw new \Resque\Exception(
|
||||
'Job class ' . $className . ' does not contain a perform method.'
|
||||
'Job class ' . $className . ' does not contain a perform() method.'
|
||||
);
|
||||
}
|
||||
|
||||
$instance = new $className();
|
||||
$instance->args = $args;
|
||||
$instance->queue = $queue;
|
||||
|
||||
return $instance;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue