ryanlecompte / redis_failover

redis_failover is a ZooKeeper-based automatic master/slave failover solution for Ruby.
http://github.com/ryanlecompte/redis_failover
MIT License
539 stars 65 forks source link

Undefined method 'job' for main object with Resque #41

Closed ScotterC closed 12 years ago

ScotterC commented 12 years ago

Getting a really weird error after implementing Redis Failover. Every resque job is failing with:

undefined local variable or method `job' for main:Object

with no backtrace.

I've been trying to localize it down to either the Resque::Job class or Resque:::Worker class with little success. The only thing that has changed though is using redis failover.

Redis Failover is working perfectly otherwise. It would seem that all writes and reads are happening but none of my resque jobs seem to be able to work on jobs correctly.

I can't seem to replicate this in development which is also disconcerting. Only staging and production.

ryanlecompte commented 12 years ago

Hey Scott,

Unfortunately I don't use resque so haven't really had the chance to test redis_failover extensively with it. However, my understanding is that other folks are using redis_failover with resque without any issues. Can you let me know which version of Ruby/Resque/redis_failover you're using? Would be great if you could give a full trace for the error.

On Tue, Nov 6, 2012 at 10:15 AM, Scott Carleton notifications@github.comwrote:

Getting a really weird error after implementing Redis Failover. Every resque job is failing with:

undefined local variable or method `job' for main:Object

with no backtrace.

I've been trying to localize it down to either the Resque::Job class or Resque:::Worker class with little success. The only thing that has changed though is using redis failover.

Redis Failover is working perfectly otherwise. It would seem that all writes and reads are happening but none of my resque jobs seem to be able to work on jobs correctly.

— Reply to this email directly or view it on GitHubhttps://github.com/ryanlecompte/redis_failover/issues/41.

ScotterC commented 12 years ago

Yea, that's kind of the problem is I haven't been able to get a backtrace yet or replicate it from console.

Redis Failover 1.0, Resque 1.22 with various resque plugins including Resque Pool which starts up my workers. Ruby 1.9.3. Redis 2.4.16.

ScotterC commented 12 years ago

Alright. I'm still getting the error when switching my staging server to a straight redis connection without Redis Failover so it can't be redis failover.

ryanlecompte commented 12 years ago

Thanks, Scott.

On Tue, Nov 6, 2012 at 10:55 AM, Scott Carleton notifications@github.comwrote:

Alright. I'm still getting the error when switching my staging server to a straight redis connection without Redis Failover so it can't be redis failover.

— Reply to this email directly or view it on GitHubhttps://github.com/ryanlecompte/redis_failover/issues/41#issuecomment-10122772.