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

Allow tasks to be scheduled on a specific cluster #555

Merged
merged 9 commits into from May 14, 2021
Merged

Conversation

midse
Copy link
Contributor

@midse midse commented May 12, 2021

We have somewhat of a specific use case. We have multiple Django projects and multiple Django Q clusters sharing the same database.

We needed to be able to specify the cluster on which the task will be scheduled (otherwise the task will scheduled on a cluster with the wrong code base and can't be executed).

I added a "cluster" field to the Schedule model and updated the schedule function as well.
When no cluster is specified when the Schedule is created, every clusters can schedule the task (this is the original behaviour).

I also updated the documentation and added a few unit tests. I hope I'm not missing something.

@Koed00 Koed00 merged commit 957f807 into Koed00:master May 14, 2021
@Koed00
Copy link
Owner

Koed00 commented May 14, 2021

Wish I had more time to review, but first impressions seems to be that this shouldn't affect normal operations

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.

None yet

2 participants