mirror of
https://github.com/idanoo/php-resque
synced 2025-07-01 21:52:21 +00:00
1.4.5 patch - formatting + composer replace
This commit is contained in:
parent
5a94c021da
commit
19f21219f8
11 changed files with 24 additions and 16 deletions
|
@ -19,8 +19,8 @@ class Resque_Failure
|
|||
* Create a new failed job on the backend.
|
||||
*
|
||||
* @param array $payload The contents of the job that has just failed.
|
||||
* @param \Exception $exception The exception generated when the job failed to run.
|
||||
* @param \Resque_Worker $worker Instance of Resque_Worker that was running this job when it failed.
|
||||
* @param Exception $exception The exception generated when the job failed to run.
|
||||
* @param Resque_Worker $worker Instance of Resque_Worker that was running this job when it failed.
|
||||
* @param string $queue The name of the queue that this job was fetched from.
|
||||
*/
|
||||
public static function create($payload, Exception $exception, Resque_Worker $worker, $queue)
|
||||
|
|
|
@ -57,7 +57,7 @@ class Resque_Job
|
|||
* @param string $id Unique identifier for tracking the job. Generated if not supplied.
|
||||
*
|
||||
* @return string
|
||||
* @throws \InvalidArgumentException
|
||||
* @throws InvalidArgumentException
|
||||
*/
|
||||
public static function create($queue, $class, $args = null, $monitor = false, $id = null)
|
||||
{
|
||||
|
|
|
@ -8,7 +8,7 @@ class Resque_Job_Factory implements Resque_Job_FactoryInterface
|
|||
* @param array $args
|
||||
* @param $queue
|
||||
* @return Resque_JobInterface
|
||||
* @throws \Resque_Exception
|
||||
* @throws Resque_Exception
|
||||
*/
|
||||
public function create($className, $args, $queue)
|
||||
{
|
||||
|
|
|
@ -45,11 +45,11 @@ class Resque_Log extends Psr\Log\AbstractLogger
|
|||
if (array_search($level, $logLevels) <= array_search($this->logLevel, $logLevels)) {
|
||||
fwrite(
|
||||
STDOUT,
|
||||
'[' . $level . '][' . strftime('%Y-%m-%d %T') . '] ' . $this->interpolate($message, $context) . PHP_EOL
|
||||
'[' . $level . '][' . strftime('%Y-%m-%d %T') . '] ' .
|
||||
$this->interpolate($message, $context) . PHP_EOL
|
||||
);
|
||||
}
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -185,7 +185,7 @@ class Resque_Redis
|
|||
// Check the URI scheme
|
||||
$validSchemes = ['redis', 'tcp'];
|
||||
if (isset($parts['scheme']) && !in_array($parts['scheme'], $validSchemes)) {
|
||||
throw new \InvalidArgumentException("Invalid DSN. Supported schemes are " . implode(', ', $validSchemes));
|
||||
throw new InvalidArgumentException("Invalid DSN. Supported schemes are " . implode(', ', $validSchemes));
|
||||
}
|
||||
|
||||
// Allow simple 'hostname' format, which `parse_url` treats as a path, not host.
|
||||
|
|
|
@ -254,8 +254,8 @@ class Resque_Worker
|
|||
}
|
||||
|
||||
/**
|
||||
* @param bool $blocking
|
||||
* @param int $timeout
|
||||
* @param bool $blocking
|
||||
* @param int $timeout
|
||||
* @return object|boolean Instance of Resque_Job if a job is found, false if not.
|
||||
*/
|
||||
public function reserve($blocking = false, $timeout = null)
|
||||
|
@ -290,11 +290,11 @@ class Resque_Worker
|
|||
* when searching for jobs.
|
||||
*
|
||||
* If * is found in the list of queues, every queue will be searched in
|
||||
* alphabetic order. (@see $fetch)
|
||||
*
|
||||
* @param boolean $fetch If true, and the queue is set to *, will fetch
|
||||
* alphabetic order. (@param boolean $fetch If true, and the queue is set to *, will fetch
|
||||
* all queue names from redis.
|
||||
* @return array Array of associated queues.
|
||||
* @see $fetch)
|
||||
*
|
||||
*/
|
||||
public function queues($fetch = true)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue