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

Job Completion Notification #205

Closed
tooolbox opened this issue Jan 14, 2020 · 0 comments · Fixed by #213
Closed

Job Completion Notification #205

tooolbox opened this issue Jan 14, 2020 · 0 comments · Fixed by #213

Comments

@tooolbox
Copy link
Collaborator

tooolbox commented Jan 14, 2020

Right now many unit tests are racy because the jobs involve shelling out to run date or a similar command, and there is no way for the scheduler of a job to know when that job has actually completed, so we rely on time.Sleep() and similar mechanisms.

This tends to create a problem for small time.Sleep() values or when running tests with -count # for testing durability.

A likely solution would be to add something like context.Done() to job.Job wherein the caller gets a channel which can be read from to block execution until the job completes.

Note: the behavior is not racey, but the tests are in some cases.

tooolbox added a commit to tooolbox/kala that referenced this issue Feb 1, 2020
@tooolbox tooolbox mentioned this issue May 6, 2020
This was referenced May 23, 2020
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 a pull request may close this issue.

1 participant