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

Clarify GetLastCompletionResult works with schedule #1225

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions workflow/workflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -517,8 +517,8 @@ func HasLastCompletionResult(ctx Context) bool {
return internal.HasLastCompletionResult(ctx)
}

// GetLastCompletionResult extract last completion result from the last successful run for this cron workflow.
// This is used in combination with cron schedule. A workflow can be started with an optional cron schedule.
// GetLastCompletionResult extract last completion result from the last successful run for this cron or schedule workflow.
// This is used in combination with cron schedule or schedule workflow. A workflow can be started with an optional cron schedule.
// If a cron workflow wants to pass some data to next schedule, it can return any data and that data will become
// available when next run starts. This will contain the last successful result even if the most recent run failed.
// This GetLastCompletionResult() extract the data into expected data structure.
Expand All @@ -532,7 +532,7 @@ func GetLastCompletionResult(ctx Context, d ...interface{}) error {
}

// GetLastError extracts the error from the last run of this workflow. If the last run of this workflow did not fail or
// this is the first run, this will be nil.
// this is the first run, this will be nil. This is used in combination with cron schedule or schedule workflow.
//
// See TestWorkflowEnvironment.SetLastError() for unit test support.
func GetLastError(ctx Context) error {
Expand Down