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

feat: set default priority #606

Merged
merged 1 commit into from
Jan 29, 2025

Conversation

geirsagberg
Copy link
Contributor

Brief, plain english overview of your changes here

This PR makes it possible to set a default priority for all built-in task types.

This makes it possible to e.g. define recurring tasks that only will run when the queue is otherwise empty.

Fixes

Reminders

  • Added/ran automated tests
  • Update README and/or examples
  • Ran mvn spotless:apply

cc @kagkarlsson

@geirsagberg geirsagberg force-pushed the set-default-priority branch 3 times, most recently from feaf2fc to df4aa09 Compare January 17, 2025 14:02
Copy link
Owner

@kagkarlsson kagkarlsson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍, just a couple of small comments.

(Also, this will not work when the client is using a TaskDescriptor to schedule new executions, i.e. without a reference to the Task, but I suppose the most important fix here is for recurring tasks)

README.md Outdated Show resolved Hide resolved
@geirsagberg
Copy link
Contributor Author

Looks good 👍, just a couple of small comments.

(Also, this will not work when the client is using a TaskDescriptor to schedule new executions, i.e. without a reference to the Task, but I suppose the most important fix here is for recurring tasks)

You can set the priority on either the TaskInstance.Builder, or on the instance itself, so should cover most use cases I believe

@kagkarlsson kagkarlsson merged commit 88ed8c3 into kagkarlsson:master Jan 29, 2025
5 checks passed
@kagkarlsson kagkarlsson added the released Issue has been released label Jan 29, 2025
@kagkarlsson
Copy link
Owner

🎉 This issue has been resolved in v15.2.0 (Release Notes)

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

Successfully merging this pull request may close these issues.

2 participants