Changeset View
Changeset View
Standalone View
Standalone View
swh/scheduler/__init__.py
Show All 9 Lines | |||||
DEFAULT_CONFIG_PATH = 'backend/scheduler' | DEFAULT_CONFIG_PATH = 'backend/scheduler' | ||||
DEFAULT_CONFIG = { | DEFAULT_CONFIG = { | ||||
'scheduler': ('dict', { | 'scheduler': ('dict', { | ||||
'cls': 'local', | 'cls': 'local', | ||||
'args': { | 'args': { | ||||
'db': 'dbname=softwareheritage-scheduler-dev', | 'db': 'dbname=softwareheritage-scheduler-dev', | ||||
}, | }, | ||||
}) | }) | ||||
} | } | ||||
ardumont: configuration | |||||
# current configuration. To be set by the config loading mechanism | |||||
CONFIG = {} | |||||
def compute_nb_tasks_from(num_tasks): | def compute_nb_tasks_from(num_tasks): | ||||
"""Compute and returns the tuple, number of tasks without priority, | """Compute and returns the tuple, number of tasks without priority, | ||||
number of tasks with priority. | number of tasks with priority. | ||||
Args: | Args: | ||||
num_tasks (int): | num_tasks (int): | ||||
▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines |
configuration