julienXX/resque-waiting-room — pull request #4 by ttakamura (2013-07-04 06:52:46+00:00)
Title: Fix rare bug in Resque::Plugins::WaitingRoom fail to set expiration to the perform counter

I found a rare bug that has happened in Resque::Plugins::WaitingRoom.

I've noticed our resque's `Example:remaining_performs` counter doesn't have any expiration once in a long while.
In the case, our resque can't perform any new job until I manually delete the `Example:remaining_performs` key.

I think it's caused by following case.

```
[Ruby process] [remaining_performs key in Redis]
------------------------------------------------------------
has_remaining_performs_key? TTL is very small
|
| ( expired!! )
|
Resque.redis.decrby SET -1 and TTL is nothing
|
```

I had tried to fix this problem by using redis's `WATCH / MULTI / EXEC` commands but it hard to implement.
So, I did quick fix :)