mirror of
https://github.com/hanzoai/tasks.git
synced 2026-10-04 02:04:03 +00:00
## What changed? - Implement ID conflict policy UseExisting - Introduce chasm.ExecutionAlreadyStartedError, same semantic as serviceerror.WorkflowExecutionAlreadyStarted. ## Why? - UseExisting conflict will be used by components we are building. ## How did you test it? - [x] built - [ ] run locally and tested manually - [ ] covered by existing tests - [x] added new unit test(s) - [x] added new functional test(s)
22 lines
477 B
Go
22 lines
477 B
Go
package chasm
|
|
|
|
type ExecutionAlreadyStartedError struct {
|
|
Message string
|
|
CurrentRequestID string
|
|
CurrentRunID string
|
|
}
|
|
|
|
func NewExecutionAlreadyStartedErr(
|
|
message, currentRequestID, currentRunID string,
|
|
) *ExecutionAlreadyStartedError {
|
|
return &ExecutionAlreadyStartedError{
|
|
Message: message,
|
|
CurrentRequestID: currentRequestID,
|
|
CurrentRunID: currentRunID,
|
|
}
|
|
}
|
|
|
|
func (e *ExecutionAlreadyStartedError) Error() string {
|
|
return e.Message
|
|
}
|