-
Notifications
You must be signed in to change notification settings - Fork 758
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 scheduler time logic #2666
Add scheduler time logic #2666
Conversation
compiledCalendar struct { | ||
tz *time.Location | ||
|
||
year, month, dayOfMonth, dayOfWeek, hour, minute, second func(int) bool |
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.
what is the input int and what is output bool?
service/worker/scheduler/calendar.go
Outdated
parseModeInt parseMode = iota | ||
parseModeMonth | ||
parseModeDow |
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.
add some simple comments
}, nil | ||
} | ||
|
||
func parseStringSpec(s string, min, max int, parseMode parseMode, f func(int)) error { |
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.
need comments on what are the expected specs.
would be good to put some input example to help reader understand this code
after time.Time, | ||
) (nominal, next time.Time, has bool) { | ||
if cs.spec.StartTime != nil && after.Before(*cs.spec.StartTime) { | ||
after = cs.spec.StartTime.Add(-time.Second) |
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.
why -1s? is that for jitter?
What changed?
Add logic to implement schedule specs in temporalio/api#157
Why?
To be used by new scheduler service
How did you test it?
unit tests
Potential risks
nothing yet