islco / django-rq-scheduler

A database backed job scheduler for Django RQ and RQ Scheduler
MIT License
42 stars 46 forks source link

Enable configuration of result_ttl in django-rq-scheduler #18

Closed frbry closed 6 years ago

frbry commented 7 years ago

Currently all scheduled and repeatable tasks are created with result_ttl=-1. This causes Result will never expire, clean up result key manually warnings to be logged, which can be annoying.

This PR creates a new field in BaseTask model so the user has the ability to change result_ttl value for newly created RQ tasks.

Note: result_ttl defaults to -1, which is weird because the RQ docs say it's 500 seconds by default: http://python-rq.org/docs/results/

frbry commented 7 years ago

Hi @g3rd, any chance you could take a look at this one? Thanks! :)

frbry commented 6 years ago

Hi @g3rd, any feedback?

oudeismetis commented 6 years ago

@frbry Sorry for the slow reply on this. At a high level this looks good. Going to pull this down and check it out, but I expect this will be merged soon.

Thanks for thinking of this!

tom-price commented 6 years ago

@oudeismetis, I've created PR #22 to merge @frbry's work into the project as there were minor issues related to the introduction of cron jobs.

oudeismetis commented 6 years ago

@frbry thank you again for the contribution! Given the merge conflict, we are looking to merge #22 to bring this feature in. Once that is merged I'll close this PR.

frbry commented 6 years ago

Thanks @oudeismetis and @tom-price!