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

fix: job wait respects Ctrl-C #976

Merged
merged 1 commit into from
Jun 3, 2022
Merged

fix: job wait respects Ctrl-C #976

merged 1 commit into from
Jun 3, 2022

Conversation

frrist
Copy link
Member

@frrist frrist commented Jun 3, 2022

closes #961

@frrist frrist self-assigned this Jun 3, 2022
Copy link
Contributor

@kasteph kasteph left a comment

Choose a reason for hiding this comment

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

lgtm!

Comment on lines 293 to 301

select {
case <-ctx.Done():
return nil, ctx.Err()
case <-job.Job.Done():
break

}
// wait on the job to complete
Copy link
Contributor

Choose a reason for hiding this comment

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

nit.

Suggested change
select {
case <-ctx.Done():
return nil, ctx.Err()
case <-job.Job.Done():
break
}
// wait on the job to complete
// wait on the scheduler/job to complete
select {
case <-ctx.Done():
return nil, ctx.Err()
case <-job.Job.Done():
break
}

@frrist frrist merged commit 13a58d2 into master Jun 3, 2022
@frrist frrist deleted the frrist/job-wait-cancel branch June 3, 2022 23:00
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.

lily job wait respects Ctrl-C
3 participants