Конфигурация
Bases: BaseSettings
Scheduler application settings.
The settings can be passed in several ways:
- By storing settings in a configuration file
config.yml(preferred). - By setting environment variables matching specific keys (
SYNCMASTER__DATABASE__URL==database.url). - By explicitly passing a settings object as an argument of application factory function.
More details can be found in
Pydantic documentation <https://docs.pydantic.dev/latest/concepts/pydantic_settings/>_.
Examples
.. code-block:: yaml :caption: config.yml
database:
url: postgresql+asyncpg://postgres:postgres@localhost:5432/syncmaster
broker:
url: amqp://user:password@localhost:5672/
logging: {}
encryption: {}
scheduler: {}
Source code in syncmaster/scheduler/settings/__init__.py
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | |
Bases: BaseModel
Scheduler settings.
Examples
.. code-block:: yaml :caption: config.yml
scheduler:
transfer_fetching_timeout_seconds: 200
misfire_grace_time_seconds: 300
Source code in syncmaster/scheduler/settings/__init__.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | |