tobymao / saq

Simple Async Queues
https://saq-py.readthedocs.io/en/latest/
MIT License
580 stars 39 forks source link

Allow users to expire, keep, or disable storage of job information #29

Closed paul-finary closed 2 years ago

paul-finary commented 2 years ago

Currently, the information attached to a job that has been processed are necessarily stored back in redis. In some cases, this is not needed, and unwanted.

I added a way for users to disable this feature by making the ttl have three states:

I thought about using positive, None, and 0, but decided to stay with one type, not sure what's best honestly.

paul-finary commented 2 years ago

I dig -1.

Can you add a test for this?

Just added several tests for the 3 different ttl "states"