Skip to content

Commit

Permalink
Set documentation for new configuration values
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielCosme committed Jun 12, 2024
1 parent 3ee0e7c commit aeb4cdb
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 9 deletions.
4 changes: 2 additions & 2 deletions enduro.toml
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ processNameMetadata = false

[worker]
heartbeatThrottleInterval = "1m"
MaxConcurrentWorkflowsExecutionsSize = 15
MaxConcurrentSessionExecutionSize = 15
maxConcurrentWorkflowsExecutionsSize = 15
maxConcurrentSessionExecutionSize = 15

[workflow]
activityHeartbeatTimeout = "30s"
9 changes: 2 additions & 7 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,6 @@ func main() {
os.Exit(1)
}

numOfWorkflows := uint64(0)
for _, a := range config.Pipeline {
numOfWorkflows += a.Capacity
}

// Logging configuration.
logger := log.New(os.Stderr,
log.WithName(appName),
Expand Down Expand Up @@ -259,8 +254,8 @@ func main() {
done := make(chan struct{})
w := temporalsdk_worker.New(temporalClient, config.Temporal.TaskQueue, temporalsdk_worker.Options{
EnableSessionWorker: true,
MaxConcurrentSessionExecutionSize: int(numOfWorkflows),
MaxConcurrentWorkflowTaskExecutionSize: int(numOfWorkflows),
MaxConcurrentSessionExecutionSize: config.Worker.MaxConcurrentSessionExecutionSize,
MaxConcurrentWorkflowTaskExecutionSize: config.Worker.MaxConcurrentWorkflowsExecutionsSize,
MaxHeartbeatThrottleInterval: config.Worker.HeartbeatThrottleInterval,
DefaultHeartbeatThrottleInterval: config.Worker.HeartbeatThrottleInterval,

Check warning on line 260 in main.go

View check run for this annotation

Codecov / codecov/patch

main.go#L256-L260

Added lines #L256 - L260 were not covered by tests
})
Expand Down
45 changes: 45 additions & 0 deletions website/content/en/docs/user-manual/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,51 @@ does not include a document with checksums, e.g. `checksum.sha1`.

E.g.: `false`


### `[worker]`

#### `heartbeatThrottleInterval` (String)

Specifies the interval at which Enduro sends heartbeats to the workflow engine.

The string should be constructed as a sequence of decimal numbers, each with
optional fraction and a unit suffix, such as "30m", "24h" or "2h30m".
Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".

E.g.: `5m` (String)

#### `maxConcurrentWorkflowsExecutionsSize` (int)

Sets the maximum number of concurrent workflow executions that Enduro will accept from the workflow engine.
A good rule of thumb is to make this value 2 times the sum total of the Archivematica pipeline capacity.

If the total pipeline capacity is 5, then this value could be set to 10.
E.g.: `10`

#### `maxConcurrentSessionExecutionSize` (in)

Sets the maximum number of concurrenlty running (workflow engine) sessions that Enduro supports.
This value governs how many concurrent SIPs are going to be processed at any given time, regardless of pipeline
capacity. This setting can be used to trotthle from a single place how many concurrent pipelines Enduro will run.

We recommend to make this value directly proportinal (or higher) than the Archivematica pipeline capacity.

E.g.: `5`

### `[worker]`

#### `activityHeartbeatTimeout` (String)

Specifies the timeout duration for activities that send heartbeats to the workflow engine.
If the activity takes more time to send a heartbeat to the workflow engine, the workflow will fail
with a `heartbeatTimeout` error.

The string should be constructed as a sequence of decimal numbers, each with
optional fraction and a unit suffix, such as "30m", "24h" or "2h30m".
Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".

E.g.: `5m` (String)

## Configuration example

Source: https://github.com/artefactual-labs/enduro/blob/main/enduro.toml.
Expand Down

0 comments on commit aeb4cdb

Please sign in to comment.