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

add EveryRandom for random interval #339

Merged
merged 2 commits into from
Jun 14, 2022
Merged

add EveryRandom for random interval #339

merged 2 commits into from
Jun 14, 2022

Conversation

JohnRoesler
Copy link
Contributor

@JohnRoesler JohnRoesler commented Jun 7, 2022

What does this do?

Which issue(s) does this PR fix/relate to?

#305

List any changes that modify/break current functionality

Have you included tests for your changes?

Did you document any new/modified functionality?

  • Updated example_test.go
  • Updated README.md

Notes

@JohnRoesler JohnRoesler mentioned this pull request Jun 7, 2022
2 tasks
@JohnRoesler JohnRoesler requested a review from Streppel June 8, 2022 16:40
@@ -16,7 +17,8 @@ import (
type Job struct {
mu *jobMutex
jobFunction
interval int // pause interval * unit between runs
interval int // interval * unit between runs
random // details for randomness

Choose a reason for hiding this comment

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

Maybe better to add it as random random // details for randomness because otherwise we can use fields from random struct directly from job struct.

Copy link

@AlexanderSutul AlexanderSutul left a comment

Choose a reason for hiding this comment

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

One small comment from my side. Otherwise 👍🏻

@JohnRoesler JohnRoesler merged commit f8144d2 into main Jun 14, 2022
@JohnRoesler JohnRoesler deleted the every-random branch June 14, 2022 10:46
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