MCPcopy Create free account
hub / github.com/python-arq/arq / Settings

Class Settings

tests/test_utils.py:113–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111
112def redis_settings_validation():
113 class Settings(BaseModel, arbitrary_types_allowed=True):
114 redis_settings: RedisSettings
115
116 @field_validator('redis_settings', mode='before')
117 def parse_redis_settings(cls, v):
118 if isinstance(v, str):
119 return RedisSettings.from_dsn(v)
120 else:
121 return v
122
123 s1 = Settings(redis_settings='redis://foobar:123/4')
124 assert s1.redis_settings.host == 'foobar'

Callers 1

Calls

no outgoing calls

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…