Files
tasks/service/history/interfaces/workflow_task_info.go
Alex ShtinandGitHub 8e8f1b0f7c Remove license header from every file (#7689)
## What changed?
<!-- Describe what has changed in this PR -->
Remove license header from every file. Because it is really hard to
follow in this PR here is the summary:
1. License header is removed from all `.go` and `.proto` files
:fireworks::fireworks:🎆.
2. `LICENSE` file in the root directory has only Temporal and Uber
copyrights.
3. 5 other `LICENSE` files added to the packages which have copyrights
different from Temporal and Uber: Datadog, Xargin, "Mat Ryer, Tyler
Bunnell and contributors".
4. `license_file` flag is removed from all code generation tools.
5. `copyright_file` flag is removed from `go:generate mockgen`
directive.
6. All copyright related targets are removed from `Makefile`.
7. Updated Temporal copyright year to 2025 everywhere.

## Why?
<!-- Tell your future self why have you made these changes -->
I double checked with legal department that it is not needed to have
license header in every file. One file per repo is enough. I put all
copyrights to the root `LICENSE` file and removed header from all other
files. Also updated tools and `Makefile`.
2025-05-01 18:50:21 -07:00

57 lines
2.5 KiB
Go

package interfaces
import (
"time"
taskqueuepb "go.temporal.io/api/taskqueue/v1"
enumsspb "go.temporal.io/server/api/enums/v1"
)
// TODO: This should be part of persistence layer
type WorkflowTaskInfo struct {
Version int64
ScheduledEventID int64
StartedEventID int64
RequestID string
WorkflowTaskTimeout time.Duration
// This is only needed to communicate task queue used after AddWorkflowTaskScheduledEvent.
TaskQueue *taskqueuepb.TaskQueue
Attempt int32
// Scheduled and Started timestamps are useful for transient workflow task: when transient workflow task finally completes,
// use these Timestamp to create scheduled/started events.
// Also used for recording latency metrics
ScheduledTime time.Time
StartedTime time.Time
// OriginalScheduledTime is to record the first scheduled workflow task during workflow task heartbeat.
// Client may to heartbeat workflow task by RespondWorkflowTaskComplete with ForceCreateNewWorkflowTask == true
// In this case, OriginalScheduledTime won't change. Then when time.Now().UTC()-OriginalScheduledTime exceeds
// some threshold, server can interrupt the heartbeat by enforcing to time out the workflow task.
OriginalScheduledTime time.Time
// Indicate type of the current workflow task (normal, transient, or speculative).
Type enumsspb.WorkflowTaskType
// These two fields are sent to workers in the WorkflowTaskStarted event. We need to save a
// copy in mutable state to know the last values we sent (which might have been in a
// transient event), otherwise a dynamic config change of the suggestion threshold could
// cause the WorkflowTaskStarted event that the worker used to not match the event we saved
// in history.
SuggestContinueAsNew bool
HistorySizeBytes int64
// BuildIdRedirectCounter tracks the started build ID redirect counter for transient/speculative WFT. This
// info is to make sure the right redirect counter is used in the WFT started event created later
// for a transient/speculative WFT.
// Deprecated.
BuildIdRedirectCounter int64
// BuildId tracks the started build ID for transient/speculative WFT. This info is used for two purposes:
// - verify WFT completes by the same Build ID that started in the latest attempt
// - when persisting transient/speculative WFT, the right Build ID is used in the WFT started event
// Deprecated.
BuildId string
}
type WorkflowTaskCompletionLimits struct {
MaxResetPoints int
MaxSearchAttributeValueSize int
}