WorkerSettings contains validated runtime policy for one worker deployment.
Common settings
Advanced recovery settings
Change these only for a diagnosed deployment or with support guidance:Environment variables
WorkerSettings.from_env() reads:
For snapshot retention,
none and null mean indefinite retention. Names are exact;
unrecognized MODAL_DEVIN_* variables are ignored.
Validation
Durations, counts, and timeouts must be positive, except that status retry delay may be zero and snapshot retention may beNone. Log level is case-insensitive and accepts
CRITICAL, ERROR, WARNING, INFO, or DEBUG.
Invalid values raise ConfigurationError during application startup.
Derived function timeout
worker.session_function_timeout_seconds provides the minimum function duration
needed for the configured worker run plus startup, final-state handling, filesystem
preservation, and cleanup. Use the property in the generated decorator instead of
copying a numeric value.