-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Unused instance variable #19
Comments
This variable is used. I've added a comment to explain: 0f296e3 Cheers! |
Unless I'm missing something, it looks like @watched_queues is only being read. I can't find anywhere that it's actually being set.
It seems like the following line should be added to actually cache the queue:
Also, if the queue parameter is ever anything other than a string (I haven't checked to see if that actually ever happens), the following change should probably be made to avoid cache misses:
|
You're right, looks like this needs a bugfix and a testcase. |
I made an attempt at a fix (mrduncan/resque@6e4233ea6d0b8cba6068f9bb05253470fd0f6253). The only issue that I see with it is if a queue is removed it could still be in the cache of another process - seems like the Redis set which holds queue names might not get an entry for that queue if a new job is pushed. |
I think you're right about the other processes caching queues. Since this has never actually worked, it's probably a case of premature optimization. I removed it in 02a6ac1 Thanks! |
The @watched_queues instance variable in resque.rb is read but never written to.
The following commit removes it entirely:
mrduncan/resque@298125b9b1aa29d6214e64d44e7803cbacc17193
The text was updated successfully, but these errors were encountered: