nvie/rq — pull request #455 by negz (2014-11-26 01:13:41+00:00)
Title: Ensure the FinishedJobRegistry honors an 'infinite' result_ttl of -1

@selwin

The `FinishedJobRegistry`'s `cleanup()` method purges jobs older than `add()` time (i.e. job finish time) + `result_ttl`. However per the RQ documentation jobs with a `result_ttl` of `-1` never expire - they should be cleaned up manually. Currently jobs with a `result_ttl` of `-1` are guaranteed to be purged any time the `cleanup()` (and thus `get_job_ids()`) method of the `FinishedJobRegistry` is called, because their score (i.e. expiry time) is set to one second before the job finished.

This pull request ensures such jobs will instead remain in the `FinishedJobRegistry` forever.