-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update AIS integration to use Enduro's poststorage child workflows. - Remove AIS API server. - Remove `AIPName` and make `AIPUUID` a string in AIS `WorkflowParams`. - Add local activity to get the AIP current path from AMSS. - Parse AIP directory name from current path.
- Loading branch information
Showing
14 changed files
with
157 additions
and
203 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package ais | ||
|
||
import "context" | ||
|
||
type GetAIPPathActivityParams struct { | ||
AMSSClient *AMSSClient | ||
AIPUUID string | ||
} | ||
|
||
type GetAIPPathActivityResult struct { | ||
Path string | ||
} | ||
|
||
func GetAIPPathActivity(ctx context.Context, params *GetAIPPathActivityParams) (*GetAIPPathActivityResult, error) { | ||
path, err := params.AMSSClient.GetAIPPath(ctx, params.AIPUUID) | ||
if err != nil { | ||
return nil, err | ||
} | ||
return &GetAIPPathActivityResult{Path: path}, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
package ais | ||
|
||
import ( | ||
"time" | ||
|
||
temporalsdk_temporal "go.temporal.io/sdk/temporal" | ||
temporalsdk_workflow "go.temporal.io/sdk/workflow" | ||
) | ||
|
||
// We use this constant to represent a long period of time (10 years). | ||
const forever = time.Hour * 24 * 365 * 10 | ||
|
||
// withActivityOptsForLongLivedRequest returns a workflow context with activity | ||
// options suited for long-running activities without heartbeats | ||
func withActivityOptsForLongLivedRequest(ctx temporalsdk_workflow.Context) temporalsdk_workflow.Context { | ||
return temporalsdk_workflow.WithActivityOptions(ctx, temporalsdk_workflow.ActivityOptions{ | ||
StartToCloseTimeout: time.Hour * 2, | ||
RetryPolicy: &temporalsdk_temporal.RetryPolicy{ | ||
InitialInterval: time.Second, | ||
BackoffCoefficient: 2, | ||
MaximumInterval: time.Minute * 10, | ||
MaximumAttempts: 5, | ||
NonRetryableErrorTypes: []string{ | ||
"TemporalTimeout:StartToClose", | ||
}, | ||
}, | ||
}) | ||
} | ||
|
||
// withFilesystemActivityOpts returns a workflow context with activity | ||
// options suited for activities like disk operations that should not | ||
// require a retry policy attached. | ||
func withFilesystemActivityOpts(ctx temporalsdk_workflow.Context) temporalsdk_workflow.Context { | ||
return temporalsdk_workflow.WithActivityOptions(ctx, temporalsdk_workflow.ActivityOptions{ | ||
StartToCloseTimeout: time.Hour, | ||
RetryPolicy: &temporalsdk_temporal.RetryPolicy{ | ||
MaximumAttempts: 1, | ||
}, | ||
}) | ||
} | ||
|
||
// withLocalActivityOpts returns a workflow context with activity options suited | ||
// for local and short-lived activities with a few retries. | ||
func withLocalActivityOpts(ctx temporalsdk_workflow.Context) temporalsdk_workflow.Context { | ||
return temporalsdk_workflow.WithLocalActivityOptions(ctx, temporalsdk_workflow.LocalActivityOptions{ | ||
ScheduleToCloseTimeout: 5 * time.Second, | ||
RetryPolicy: &temporalsdk_temporal.RetryPolicy{ | ||
InitialInterval: time.Second, | ||
BackoffCoefficient: 2, | ||
MaximumInterval: time.Minute, | ||
MaximumAttempts: 3, | ||
}, | ||
}) | ||
} |
Oops, something went wrong.