pyfarm.master.config module

Configuration

A small wrapper around pyfarm.core.config.Configuration that loads in the configuration files and provides backwards compatibility for some environment variables.

class pyfarm.master.config.Configuration[source]

Bases: pyfarm.core.config.Configuration

The main configuration object for the master, models and scheduler. This will load in the configuration files and also handle any overrides present in the environment.

Variables:ENVIRONMENT_OVERRIDES – A dictionary containing all environment variables we support as overrides. This set is mainly provided for backwards comparability purposes or for the rare case where an environment override would be preferred over a config.
ENVIRONMENT_OVERRIDES = {'scheduler_broker': ('PYFARM_SCHEDULER_BROKER', <function read_env at 0x7f04ee7e5ea0>), 'default_job_delete_time': ('PYFARM_DEFAULT_JOB_DELETE_TIME', functools.partial(<function read_env_strict_number at 0x7f04ee791158>, number_type=<class 'int'>)), 'agent_request_timeout': ('PYFARM_AGENT_REQUEST_TIMEOUT', functools.partial(<function read_env_strict_number at 0x7f04ee791158>, number_type=<class 'int'>)), 'transaction_retries': ('PYFARM_TRANSACTION_RETRIES', functools.partial(<function read_env_strict_number at 0x7f04ee791158>, number_type=<class 'int'>)), 'base_url': ('PYFARM_BASE_URL', <function read_env at 0x7f04ee7e5ea0>), 'autocreate_users': ('PYFARM_AUTOCREATE_USERS', <function read_env_bool at 0x7f04ee793e18>), 'secret_key': ('PYFARM_SECRET_KEY', functools.partial(<function read_env at 0x7f04ee7e5ea0>, log_result=False)), 'tasklogs_dir': ('PYFARM_LOGFILES_DIR', <function read_env at 0x7f04ee7e5ea0>), 'scheduler_lockfile_base': ('PYFARM_SCHEDULER_LOCKFILE_BASE', <function read_env at 0x7f04ee7e5ea0>), 'agent_updates_webdir': ('PYFARM_AGENT_UPDATES_WEBDIR', <function read_env at 0x7f04ee7e5ea0>), 'farm_name': ('PYFARM_FARM_NAME', <function read_env at 0x7f04ee7e5ea0>), 'dev_db_create_all': ('PYFARM_DEV_APP_DB_CREATE_ALL', functools.partial(<function read_env_bool at 0x7f04ee793e18>, default=False)), 'instance_application': ('PYFARM_APP_INSTANCE', functools.partial(<function read_env_bool at 0x7f04ee793e18>, default=False)), 'from_email': ('PYFARM_FROM_ADDRESS', <function read_env at 0x7f04ee7e5ea0>), 'smtp_server': ('PYFARM_MAIL_SERVER', <function read_env at 0x7f04ee7e5ea0>), 'database': ('PYFARM_DATABASE_URI', functools.partial(<function read_env at 0x7f04ee7e5ea0>, log_result=False)), 'agent_updates_dir': ('PYFARM_AGENT_UPDATES_DIR', <function read_env at 0x7f04ee7e5ea0>), 'timestamp_format': ('PYFARM_TIMESTAMP_FORMAT', <function read_env at 0x7f04ee7e5ea0>), 'echo_sql': ('PYFARM_SQL_ECHO', <function read_env_bool at 0x7f04ee793e18>), 'dev_db_drop_all': ('PYFARM_DEV_APP_DB_DROP_ALL', functools.partial(<function read_env_bool at 0x7f04ee793e18>, default=False)), 'login_disabled': ('PYFARM_LOGIN_DISABLED', <function read_env_bool at 0x7f04ee793e18>), 'pretty_json': ('PYFARM_JSON_PRETTY', <function read_env_bool at 0x7f04ee793e18>), 'allow_agents_from_loopback': ('PYFARM_DEV_ALLOW_AGENT_LOOPBACK_ADDRESSES', <function read_env_bool at 0x7f04ee793e18>)}