views:

22

answers:

1

I'm using Rails with Resque.

I know the command of redis-cli is:

expire key 100

But I don't know how to set the expire time when adding a task to resque, what should I do?

A: 

Get the redis connection:

Resque.redis.expire "key", 100

The redis is defined in redis-rb gem

Freewind