ecsjobs.config module
- class ecsjobs.config.Config[source]
Bases:
object- YAML_EXTNS = ['.yml', '.yaml']
File extensions to consider as YAML config files.
- _get_multipart_config(bucket, prefix)[source]
Retrieve each piece of a multipart config from S3; return the combined configuration (i.e. the corresponding single-dict config).
- _get_yaml_from_s3(bucket, key)[source]
Retrieve the contents of a file from S3 and deserialize the YAML.
- _global_defaults = {'email_subject': 'ECSJobs Report', 'failure_command': None, 'failure_html_path': None, 'inter_poll_sleep_sec': 10, 'max_total_runtime_sec': 3600}
Default values for global configuration settings.
- _load_config()[source]
Check environment variables; call either
_load_config_s3()or_load_config_local().- Raises:
RuntimeError
- _load_config_local(conf_path)[source]
Load configuration from the local filesystem. Sets
self._raw_conf.- Parameters:
conf_path (str) – path to configuration on local FS
- _load_config_s3(bucket_name, key_name)[source]
Retrieve and load configuration from S3. Sets
self._raw_conf.
- get_global(k)[source]
Return the value of the specified global configuration setting, from the global configuration (if present) or else from the global defaults.
- Parameters:
k – configuration key to get
- Returns:
value of global config setting
- property jobs
Return the list of
ecsjobs.jobs.base.Jobinstances.- Returns:
list of jobs
- Return type: