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

Add priority to workflow instance #354

Merged
merged 16 commits into from
Nov 25, 2019
Merged

Add priority to workflow instance #354

merged 16 commits into from
Nov 25, 2019

Conversation

ttiurani
Copy link
Contributor

@ttiurani ttiurani commented Nov 23, 2019

Adds priority two byte integer to the nflow_workflow table. When an executor chooses from many available scheduled workflow instances it primarily (unfairly) schedules the workflow instance with the larger priority value, and for workflows with the same priority, the one scheduled first. Priority defaults to 0 and can also be negative. (The difference in priority integer value is not significant: 1 vs 2 is treated identically to -1000 vs 1000 – in both cases latter is executed before the former.)

Database migration is documented with options to either do it with one alter table (for reasonably small workflow instance count) or in phases.

#355 adds support for specifying a default priority in the workflow definition, which is the most typical use case.

@efonsell
Copy link
Member

I think it would be nice to have the default priority for new instances defined in the workflow definition (which would have default value 0)

@coveralls
Copy link

coveralls commented Nov 23, 2019

Coverage Status

Coverage remained the same at 67.742% when pulling 0912067 on add-priority-to-workflow into ed692b4 on master.

CHANGELOG.md Show resolved Hide resolved
@efonsell efonsell merged commit 786d591 into master Nov 25, 2019
@efonsell efonsell deleted the add-priority-to-workflow branch November 25, 2019 12:52
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

4 participants