-
Notifications
You must be signed in to change notification settings - Fork 11.4k
[5.4] Test and fix RedisQueue for phpredis #17853
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Many phpnotice are printed to the travis-ci log. I think it has something to do with phpredis connection being open and the
|
Is that ZADD fix still nessesary. Didn't #17832 fix that already? |
I don't know, I was writing this PR before #17832, maybe necessary maybe not, but does not hurt? |
I wouldn't change it, unless it's nessesary. |
Let me check then |
No it does not work without the change. So the change is required. |
Sorry, the change is not required :D. Only mock tests failed |
Awesome! Great work otherwise. |
@@ -123,7 +123,7 @@ public function later($delay, $job, $data = '', $queue = null) | |||
protected function laterRaw($delay, $payload, $queue = null) | |||
{ | |||
$this->getConnection()->zadd( | |||
$this->getQueue($queue).':delayed', $this->availableAt($delay), $payload | |||
$this->getQueue($queue).':delayed', [$payload => $this->availableAt($delay)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not necessary.
json_encode(['displayName' => 'foo', 'job' => 'foo', 'maxTries' => null, 'timeout' => null, 'data' => ['data'], 'id' => 'foo', 'attempts' => 0]) | ||
[ | ||
json_encode(['displayName' => 'foo', 'job' => 'foo', 'maxTries' => null, 'timeout' => null, 'data' => ['data'], 'id' => 'foo', 'attempts' => 0]) => 2, | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not necessary.
json_encode(['displayName' => 'foo', 'job' => 'foo', 'maxTries' => null, 'timeout' => null, 'data' => ['data'], 'id' => 'foo', 'attempts' => 0]) | ||
[ | ||
json_encode(['displayName' => 'foo', 'job' => 'foo', 'maxTries' => null, 'timeout' => null, 'data' => ['data'], 'id' => 'foo', 'attempts' => 0]) => 2, | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not necessary.
.travis.yml
file andInteractsWithRedis
trait.RedisQueue
for phpredis: call to zadd.'WITHSCORES'
should be converted to'withscores'