Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added rqcronjobs management command to easily manage cron jobs from settings file #174

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lechup
Copy link
Contributor

@lechup lechup commented Jun 29, 2016

Idea here:
#159 (comment)

  • created rqcronjobs management command
  • added some tests
  • added some documentation

To verify:

  • does it make sense to use lazy for RQ_CRONJOBS
  • are all variable names/function names sane?
  • should we remove onlyt cronjobs while iterating over scheduler or it's ok to just remove eveything? how to check that?

rq#159 (comment)

* created `rqcronjobs` management command
* add some tests for it
* add some documentation
@selwin
Copy link
Collaborator

selwin commented Jul 16, 2016

Thanks for the PR, @lechup . I think it's better if we implement a better way (one that doesn't require iterating through all jobs) to check whether a certain job is already scheduled.

This should be implemented in rq-scheduler so everyone can benefit from that (especially now that rq-scheduler supports cron jobs.

@selwin
Copy link
Collaborator

selwin commented Jul 16, 2016

I'm still thinking of how best we should implement this, so suggestions are welcome.

@lechup
Copy link
Contributor Author

lechup commented Jul 25, 2016

Hm... Yeah. I only use cronjob in my projects (no enqueue_in/at) so iterating and by default remove old and add new jobs was the KISS'est sollution for me. For sure I should add a check there to filter only cron jobs... Or create a get_cronjobs() on scheduler API and use that one here in management command?

I guess by saying It should be implemented in rq-scheduler you mean some kind of generic API that would enable cronjobs management by setting file? That one I proposed is django one so I thought django-rq would be a better place...

I'm also open for discussion and proposals :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants