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: user-scheduled tasks #120

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

feat: user-scheduled tasks #120

wants to merge 8 commits into from

Conversation

snadrus
Copy link
Contributor

@snadrus snadrus commented Jul 24, 2024

Here's a sketch of a dramatically simpler system than what we had before.
There was as little change as possible to the task engine: I just needed a way to peaceably return the task to the queue without a failure getting logged.

It's not a perfect system (see downsides), but it's so much simpler to reason about that I think we can verify that it would work.

Notice the interface passthru.

@snadrus snadrus requested a review from magik6k July 24, 2024 05:33
Copy link
Collaborator

@magik6k magik6k left a comment

Choose a reason for hiding this comment

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

Seeded to stare at this for a bit to figure out the flows, but in general looks good.

Would be great to test this somehow, I don't think any of us will use this feature any time soon, so having that test is quite important.

Would also be nice to implement some small Go server implementing some simple policy like round-robin serving this API - mostly as a base for people to take and modify to fit their needs

harmony/taskhelp/usertaskmgt/usertaskmgt.go Show resolved Hide resolved
deps/config/types.go Outdated Show resolved Hide resolved
@snadrus
Copy link
Contributor Author

snadrus commented Jul 24, 2024

Also the Do() error cases need intelligent handling so as not to fail tasks on scheduling-server down.
User configuration will be needed to determine the best course of action at scheduling-server down.

@snadrus snadrus marked this pull request as ready for review July 30, 2024 21:30
@snadrus snadrus changed the title dramatically simpler user task system feat: user-scheduled tasks Jul 31, 2024
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