-
Notifications
You must be signed in to change notification settings - Fork 26
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
GirlFriday.status error: LocalJumpError: no block given (yield) #37
Comments
Fredrik, this is a bug in the current release of girl_friday. It has been On Mon, Sep 26, 2011 at 6:12 PM, Fredrik Bjrk <
|
Ryan, any idea how this bug could have gotten released? I thought we had tests for Redis storage. |
No clue, it looks like it got in there with @jc00ke's release yesterday. When I was doing my code cleanup branch this morning I noticed that the #size method was broken, and fixed it. I forgot to mention it to you guys this morning when I sent the code review out. I thought we had Redis tests too, but perhaps none that exercised #size. |
Added exercise for #size |
Great. I think this was a result of the recent refactor to use connection_pool for the Redis storage class (that particular method wasn't using the block-based approach). Thanks for adding the test! |
I put this in my girl_friday.rb initializer:
require 'redis'
require 'connection_pool'
$redis = ConnectionPool.new(size: 4) { Redis.connect(url: ENV["REDISTOGO_URL"]) }
SYNC_ACCOUNT_QUEUE = GirlFriday::WorkQueue.new(:sync_account, size: 2, store: GirlFriday::Store::Redis, store_config: { pool: $redis }) do |msg|
Account.sync_account_info(msg[:account_id])
end
When I tried to run GirlFriday.status I get this now:
LocalJumpError: no block given (yield)
from /app/vendor/bundle/ruby/1.9.1/gems/girl_friday-0.9.6/lib/girl_friday/persistence.rb:56:in block in redis'
from /app/vendor/bundle/ruby/1.9.1/gems/connection_pool-0.1.0/lib/connection_pool.rb:41:inwith'
from /app/vendor/bundle/ruby/1.9.1/gems/girl_friday-0.9.6/lib/girl_friday/persistence.rb:55:in redis'
from /app/vendor/bundle/ruby/1.9.1/gems/girl_friday-0.9.6/lib/girl_friday/persistence.rb:44:insize'
from /app/vendor/bundle/ruby/1.9.1/gems/girl_friday-0.9.6/lib/girl_friday/work_queue.rb:55:in status'
from /app/vendor/bundle/ruby/1.9.1/gems/girl_friday-0.9.6/lib/girl_friday.rb:43:inblock in status'
from /app/vendor/bundle/ruby/1.9.1/gems/girl_friday-0.9.6/lib/girl_friday.rb:41:in each'
from /app/vendor/bundle/ruby/1.9.1/gems/girl_friday-0.9.6/lib/girl_friday.rb:41:ininject'
from /app/vendor/bundle/ruby/1.9.1/gems/girl_friday-0.9.6/lib/girl_friday.rb:41:in `status'
The text was updated successfully, but these errors were encountered: