How to set expire time when add a task to resque?
-
14-09-2020 - |
Pergunta
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?
Solução
Get the redis connection:
Resque.redis.expire "key", 100
The redis is defined in redis-rb
gem
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow