-
-
Notifications
You must be signed in to change notification settings - Fork 56
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
Job service #255
Job service #255
Conversation
Codecov ReportAttention:
... and 8 files with indirect coverage changes 📢 Thoughts on this report? Let us know!. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one comment
$0.start() | ||
public func run() async throws { | ||
try await withGracefulShutdownHandler { | ||
try await withThrowingTaskGroup(of: Void.self) { group in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be a discarding task group?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A discarding task group doesn't give you any info on when a child task has finished. So I have no way to control how many tasks are running. I think a normal task group is ok as long as you are calling next() as that'll drop finished tasks off the list. I will need to check that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Going to merge this and revisit the usage to withTaskGroup
Restructure Job handlers to use TaskGroup and conform to ServiceLifecycle
Service