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

Feature/action manager priority queue #1526

Conversation

shsteimer
Copy link
Contributor

I think this is mostly self explanatory. By adding an optional parameter to the action manager for the priority, we can give tasks a priority and order their execution based on this priority.

While this does not exactly guarantee the order of execution (could vary depending on how long various tasks take), it does allow you to order tasks that are more important first. For example, you may want to execute more resource intensive tasks first to free up those resources for other things.

@coveralls
Copy link

coveralls commented Oct 26, 2018

Coverage Status

Coverage increased (+0.6%) to 41.515% when pulling 97d660e on shsteimer:feature/action-manager-priority-queue into 017c880 on Adobe-Consulting-Services:master.

@badvision badvision self-assigned this Oct 26, 2018
@badvision badvision added this to the 3.19.0 milestone Oct 26, 2018
String fullName = String.format("%s (%s)", name, UUID.randomUUID().toString());

ActionManagerImpl manager = new ActionManagerImpl(fullName, taskRunner, resourceResolver, saveInterval);
ActionManagerImpl manager = new ActionManagerImpl(fullName, taskRunner, resourceResolver, saveInterval, priroty);
Copy link
Contributor

Choose a reason for hiding this comment

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

Misspelled priority

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is exactly the sort of high quality code review I expect.

Snark aside, will fix this, thanks for pointing it out.

Copy link
Contributor

Choose a reason for hiding this comment

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

Hey, it's open-source. You're getting so much more than you paid for already! ;P But seriously, thanks for the awesome PR!

Copy link
Contributor

@badvision badvision left a comment

Choose a reason for hiding this comment

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

Apart from needing one minor spelling correction, it looks great!

@badvision badvision merged commit 8e15b87 into Adobe-Consulting-Services:master Oct 26, 2018
@shsteimer shsteimer deleted the feature/action-manager-priority-queue branch April 5, 2019 19:37
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.

3 participants