TaskManager
TaskManager
Section titled “TaskManager”Configures task execution settings including retry strategies.
This object can be configured from the WebUI under Settings › Task Manager
Fields
Section titled “Fields”maxAttempts
Section titled “maxAttempts”Type:
UnsignedInt· default:3· min: 1Maximum number of attempts for retrying a task
strategy
Section titled “strategy”Type:
TaskRetryStrategy· requiredStrategy to use for retrying failed tasks
totalDeadline
Section titled “totalDeadline”Type:
Duration· default:"6h"Total deadline for retrying a task before it is marked as failed
JMAP API
Section titled “JMAP API”The TaskManager singleton is available via the urn:stalwart:jmap capability.
x:TaskManager/get
Section titled “x:TaskManager/get”This is a standard Foo/get method as defined in RFC 8620, Section 5.1.
For singletons, the ids argument should be the literal singleton (or null to return the single instance).
This method requires the sysTaskManagerGet permission.
curl -X POST https://mail.example.com/api \ -H 'Authorization: Bearer $TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "methodCalls": [ [ "x:TaskManager/get", { "ids": [ "singleton" ] }, "c1" ] ], "using": [ "urn:ietf:params:jmap:core", "urn:stalwart:jmap" ] }'x:TaskManager/set
Section titled “x:TaskManager/set”This is a standard Foo/set method as defined in RFC 8620, Section 5.3.
For singletons, only the update argument with id singleton is accepted; create and destroy arguments are rejected.
This method requires the sysTaskManagerUpdate permission.
curl -X POST https://mail.example.com/api \ -H 'Authorization: Bearer $TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "methodCalls": [ [ "x:TaskManager/set", { "update": { "singleton": { "maxAttempts": 3 } } }, "c1" ] ], "using": [ "urn:ietf:params:jmap:core", "urn:stalwart:jmap" ] }'stalwart-cli wraps the same JMAP calls. See the CLI reference for installation, authentication, and general usage.
stalwart-cli get TaskManagerUpdate
Section titled “Update”stalwart-cli update TaskManager --field maxAttempts=3Nested types
Section titled “Nested types”TaskRetryStrategy
Section titled “TaskRetryStrategy”Retry strategy for failed tasks.
ExponentialBackoff: Exponential backoff. Carries the fields ofTaskRetryStrategyBackoff.FixedDelay: Fixed delay. Carries the fields ofTaskRetryStrategyFixed.
TaskRetryStrategyBackoff
Section titled “TaskRetryStrategyBackoff”Exponential backoff retry strategy settings.
factor
Section titled “factor”Type:
Float· default:2.0· min: 1Backoff factor for calculating retry delays
initialDelay
Section titled “initialDelay”Type:
Duration· default:"1m"Initial delay before retrying a failed task
maxDelay
Section titled “maxDelay”Type:
Duration· default:"30m"Maximum delay between retry attempts
jitter
Section titled “jitter”Type:
Boolean· default:trueWhether to apply jitter to the retry delay to avoid thundering herd problem
TaskRetryStrategyFixed
Section titled “TaskRetryStrategyFixed”Fixed delay retry strategy settings.
Type:
Duration· default:"5m"Fixed delay before retrying a failed task