-
Notifications
You must be signed in to change notification settings - Fork 48
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
Get rid of async package & remove unused runner interfaces #544
base: master
Are you sure you want to change the base?
Conversation
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.
There is a significant behavior change here from changing the async callback portions to execute at a specific part in the sched step loop, to happening immediately after the async function portion completes. This could have performance implications and these modify the inProgressJobs struct which has no concurrency protection (and could be in the middle of e.g. task schedule and assignment). From a purely "refactor" perspective it would be good to preserve the async ProcessMessages functionality in some way to keep processing behavior as-is.
if err != nil { | ||
return nil, runner.ServiceStatus{}, err | ||
} | ||
st, err = runners.StatusesRO(st).QueryNow(q) | ||
return st, svc, err | ||
} | ||
|
||
func (c *simpleClient) Query(q runner.Query, w runner.Wait) ([]runner.RunStatus, runner.ServiceStatus, error) { | ||
// TODO: implement |
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.
?
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.
Whoops - had to add this to collapse the StatusQueryNower iface into the StatusQuerier, even though we don't use this. Meant to add a better comment.
I agree with Drew's comment (keep processing the tasks' results as a specific action in the loop). I was expecting the changes to be along the following lines:
we can attack cleaning up the worker api implementation (Controller, Reader, StatusQuerier, QuerierNow, etc.) at a later date. |
For the record, I'm totally on board with the worker api simplification in this diff. IF it does not cause breaking API changes, i.e. when this lands we cannot redeploy scoot components safely without additional changes. |
rcouto seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
we don't need them!