Error in node-resque

38 views
Skip to first unread message

Paul Tiseo

unread,
Nov 12, 2015, 3:25:53 PM11/12/15
to actionHero.js
I changed from fakeredis to redis, and get an error when I control-C the server:

/Users/ptiseo/Documents/Repositories/Mailroom/node_modules/actionhero/node_modules/node-resque/lib/connection.js:87
    self.redis.disconnect();
               ^

TypeError: self.redis.disconnect is not a function
    at connection.end (/Users/ptiseo/Documents/Repositories/Mailroom/node_modules/actionhero/node_modules/node-resque/lib/connection.js:87:16)
    at queue.end (/Users/ptiseo/Documents/Repositories/Mailroom/node_modules/actionhero/node_modules/node-resque/lib/queue.js:29:19)
    at /Users/ptiseo/Documents/Repositories/Mailroom/node_modules/actionhero/node_modules/node-resque/lib/scheduler.js:74:18
    at Command.callback (/Users/ptiseo/Documents/Repositories/Mailroom/node_modules/actionhero/node_modules/node-resque/lib/scheduler.js:167:11)
    at RedisClient.return_reply (/Users/ptiseo/Documents/Repositories/Mailroom/node_modules/redis/index.js:642:25)
    at /Users/ptiseo/Documents/Repositories/Mailroom/node_modules/redis/index.js:307:18
    at doNTCallback0 (node.js:428:9)
    at process._tickDomainCallback (node.js:398:13)

Evan Tahler

unread,
Nov 12, 2015, 3:45:34 PM11/12/15
to actionHero.js
This works with `ioredis`, and is solved in later versions of node-resque ( https://github.com/taskrabbit/node-resque/commit/e59c01960855abfef6967838f3065cfdf3201d37 ).

I'll update actionhero and put out a new version soon

Paul Tiseo

unread,
Nov 12, 2015, 3:56:00 PM11/12/15
to actionHero.js
Hmm. If I switch api.config.redis.package to ioredis, it will use that as a client?

Evan Tahler

unread,
Nov 12, 2015, 3:57:18 PM11/12/15
to actionHero.js
yep.  In my opinion, `ioredis` is a superior node redis client to `redis`.  They have an almost 100% compatible API. 

Paul Tiseo

unread,
Nov 12, 2015, 4:15:33 PM11/12/15
to actionHero.js
So, I switched over to ioredis in config/redis.js, partly just to get back to work, partly based on your perf recommendation, and I'm pretty sure my task is not running? Normally, I'd get flooded with api.log "info: worker:" messages, but now it's oddly silent?

Paul Tiseo

unread,
Nov 12, 2015, 4:52:59 PM11/12/15
to actionHero.js
Yeah, I can pop back and forth in config from fakeredis to ioredis and the latter seems to not run my recurrent task.

Evan Tahler

unread,
Nov 12, 2015, 5:34:06 PM11/12/15
to actionHero.js

check to be sure that your task isn’t already claimed and being ‘worked’ on by an other / dead instance of actionhero.  Proper shutdown behavior matters when using real redis.

Reply all
Reply to author
Forward
0 new messages