workflow

package
v0.0.0-...-c2b9680 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 24, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Overview

Package workflow contains an experimental workflow for Archivemica transfers.

It's not generalized since it contains client-specific activities. However, the long-term goal is to build a system where workflows and activities are dynamically set up based on user input.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MoveWorkflow

type MoveWorkflow struct {
	// contains filtered or unexported fields
}

func NewMoveWorkflow

func NewMoveWorkflow(logger logr.Logger, pkgsvc package_.Service) *MoveWorkflow

func (*MoveWorkflow) Execute

type ProcessingWorkflow

type ProcessingWorkflow struct {
	// contains filtered or unexported fields
}

func NewProcessingWorkflow

func NewProcessingWorkflow(
	logger logr.Logger,
	cfg config.Configuration,
	pkgsvc package_.Service,
	wsvc watcher.Service,
) *ProcessingWorkflow

func (*ProcessingWorkflow) Execute

ProcessingWorkflow orchestrates all the activities related to the processing of a SIP in Archivematica, including is retrieval, creation of transfer, etc...

Retrying this workflow would result in a new Archivematica transfer. We do not have a retry policy in place. The user could trigger a new instance via the API.

func (*ProcessingWorkflow) SessionHandler

func (w *ProcessingWorkflow) SessionHandler(
	sessCtx temporalsdk_workflow.Context,
	attempt int,
	tinfo *TransferInfo,
) error

SessionHandler runs activities that belong to the same session.

type Timer

type Timer struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewTimer

func NewTimer() *Timer

func (*Timer) Exceeded

func (t *Timer) Exceeded() bool

type TransferInfo

type TransferInfo struct {

	// IsDir indicates whether the current working copy of the transfer is a
	// filesystem directory.
	IsDir bool

	// TempPath is the temporary location of a working copy of the transfer.
	TempPath string

	// SIPID given by a3m.
	//
	// It is populated by CreateAIPActivity.
	SIPID string

	// Path to the compressed AIP generated by the preservation system.
	//
	// It is populated once the preservation system creates the AIP.
	AIPPath string

	// StoredAt is the time when the AIP is stored.
	//
	// It is populated by PollIngestActivity as long as Ingest completes.
	StoredAt time.Time

	// Information about the bundle (transfer) that we submit to Archivematica.
	// Full path, relative path...
	//
	// It is populated by BundleActivity.
	Bundle activities.BundleActivityResult

	// Identifier of the preservation action that creates the AIP
	//
	// It is populated by createPreservationActionLocalActivity .
	PreservationActionID uint

	// Identifier of the preservation system task queue name
	//
	// It is populated by the workflow request.
	GlobalTaskQueue       string
	PreservationTaskQueue string
	// contains filtered or unexported fields
}

TransferInfo is shared state that is passed down to activities. It can be useful for hooks that may require quick access to processing state.

func (*TransferInfo) Name

func (t *TransferInfo) Name() string

Directories

Path Synopsis
Package activities implements Enduro's workflow activities.
Package activities implements Enduro's workflow activities.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL