WorkerConfig#

class safir.arq.uws.WorkerConfig(arq_queue_url, arq_queue_password, grace_period, parameters_class, timeout, wobbly_url)#

Bases: Generic

Minimal configuration needed for building a UWS backend worker.

Parameters:

Attributes Summary

arq_queue_password

Password of the Redis arq queue.

arq_queue_url

URL of the Redis arq queue.

arq_redis_settings

Redis settings for arq.

grace_period

How long to wait for workers to shut down before cancelling them.

parameters_class

Class of the parameters to pass to the backend worker.

timeout

Maximum execution time.

wobbly_url

URL to the Wobbly UWS job tracking API.

Attributes Documentation

arq_queue_password: str | None = <dataclasses._MISSING_TYPE object>#

Password of the Redis arq queue.

arq_queue_url: str = <dataclasses._MISSING_TYPE object>#

URL of the Redis arq queue.

arq_redis_settings#

Redis settings for arq.

grace_period: timedelta = <dataclasses._MISSING_TYPE object>#

How long to wait for workers to shut down before cancelling them.

This should be set to somewhat less than the Kubernetes grace period for terminating the pod (about five seconds less, for example).

parameters_class: type[TypeVar(T, bound= BaseModel)] = <dataclasses._MISSING_TYPE object>#

Class of the parameters to pass to the backend worker.

timeout: timedelta = <dataclasses._MISSING_TYPE object>#

Maximum execution time.

Jobs that run longer than this length of time will be automatically aborted.

wobbly_url: str = <dataclasses._MISSING_TYPE object>#

URL to the Wobbly UWS job tracking API.