-
Notifications
You must be signed in to change notification settings - Fork 2
/
example.cfg
50 lines (33 loc) · 1.18 KB
/
example.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import os
def numCPUs():
if not hasattr(os, "sysconf"):
raise RuntimeError("No sysconf detected.")
return os.sysconf("SC_NPROCESSORS_ONLN")
SKYGRID_URL = "http://skygrid-api"
METASCHEDULER_URL = "http://metascheduler"
WORK_QUEUE = "docker_queue"
WORK_DIR = "/tmp"
THREADS_NUM = (numCPUs() - 1) or 1
DEBUG = True
SLEEP_TIME = 2 # seconds
CONTAINER_CHECK_INTERVAL = 2 # seconds
ONLY_LOCAL_IMAGES = False
DOCKER_URL = "unix://var/run/docker.sock"
DOCKER_API_VERSION = "1.17"
DOCKER_TIMEOUT = 1000
LOCK_FILE = "/tmp/skygrid-docker-worker.lock"
DOCKER_KILLALL = True # Kills and removes all containers in the system on start/SIGQUIT
PRE_REMOVE_HOOK = "" # you probably want to chown output directories before uploading/removing them
DOCKER_START_ATTEMPTS = 10 # see https://github.com/docker/docker/issues/4036
# Set up beckends
from hepbackends import MultiBackend, LocalBackend, LocalHostBackend, GitBackend, NoneBackend
from hepbackends.webdav import WebDAVBackend
BACKEND_MAP = {
"local" : LocalBackend(),
"host": LocalHostBackend(),
"git": GitBackend(),
"none": NoneBackend(),
}
backend = MultiBackend(BACKEND_MAP)
# Sentry is also supported
# SENTRY_KEY = ""