php-resque-ex-scheduler
php-resque-ex-scheduler copied to clipboard
getDelayedTimestampSize refers to wrong function
/**
* Get the number of jobs for a given timestamp in the delayed schedule.
*
* @param DateTime|int $timestamp Timestamp
* @return int Number of scheduled jobs.
*/
public static function getDelayedTimestampSize($timestamp)
{
$timestamp = self::toTimestamp($timestamp);
return \Resque::redis()->llen(self::QUEUE_NAME . ':' . $timestamp, $timestamp);
}
The first line of this functions will go wrong, this has to be:
$timestamp = self::getTimestamp($timestamp);
Also the function used to return the value isn't up to date anymore. I guess Redis was updated in between?
return \Resque::redis()->llen(self::QUEUE_NAME . ':' . $timestamp);
instead of
return \Resque::redis()->llen(self::QUEUE_NAME . ':' . $timestamp, $timestamp);