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

improve worker shutdown logic #77

Merged
merged 6 commits into from
Nov 13, 2024

Conversation

famarting
Copy link
Contributor

@famarting famarting commented Jul 19, 2024

This PR updates the logic for stopping the task worker and improves the logic for draining tasks currently being processed

This should increase the reliability of correctly completing or abandoning tasks that are being processed while a shutdown happens.

Added tests and a new hand made "mock" to help test all of this

Signed-off-by: Fabian Martinez <[email protected]>
backend/taskhub.go Show resolved Hide resolved
backend/worker.go Outdated Show resolved Hide resolved
@famarting famarting requested a review from cgillum July 22, 2024 11:21
@cgillum
Copy link
Member

cgillum commented Jul 22, 2024

@famarting looks like the unit tests are failing. Can you please take a look?

@famarting
Copy link
Contributor Author

yes, just noticed, looking at it now

@famarting
Copy link
Contributor Author

should be ready now

@famarting
Copy link
Contributor Author

ping

@cgillum
Copy link
Member

cgillum commented Sep 3, 2024

@famarting for some reason, it doesn't look like the latest commit kicked off a PR validation run. Maybe you can try pushing a quick dummy commit to see if that kicks off the tests?

@cgillum cgillum merged commit febd2db into microsoft:main Nov 13, 2024
4 checks passed
@famarting famarting deleted the improve-worker-shutdown branch November 13, 2024 12:02
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