-
Notifications
You must be signed in to change notification settings - Fork 846
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
Refactoring: extract GetNextScheduledTime into a separate function #6817
base: main
Are you sure you want to change the base?
Conversation
e5cd8f9
to
1465829
Compare
@@ -169,3 +169,27 @@ func GetPendingActivityInfo( | |||
|
|||
return p, nil | |||
} | |||
|
|||
func GetNextScheduleTime(ai *persistence.ActivityInfo) time.Time { |
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.
func GetNextScheduleTime(ai *persistence.ActivityInfo) time.Time { | |
func GetNextScheduledTime(ai *persistence.ActivityInfo) time.Time { |
pleease...
// * in this case we should use current schedule time | ||
// * this is a retry | ||
// * next scheduled time will be calculated, based on the retry policy and last time when activity was completed | ||
// * note - if delay interval was provided in the response it will be ignored |
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.
note
is not relevant here.
@@ -173,7 +173,8 @@ func updateActivityOptions( | |||
// eventually matching service will call history service (recordActivityTaskStarted) | |||
// history service will return error based on stamp. Task will be dropped | |||
|
|||
err = mutableState.RegenerateActivityRetryTask(ai) | |||
nextScheduleTime := workflow.GetNextScheduleTime(ai) |
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.
nextScheduleTime := workflow.GetNextScheduleTime(ai) | |
nextScheduledTime := workflow.GetNextScheduledTime(ai) |
What changed?
Extract
GetNextScheduledTime
into a separate function.Why?
RegenerateActivityRetryTask
.How did you test it?
run tests
Potential risks
none
Is hotfix candidate?
no