diff --git a/bugsink/conf_templates/docker.py.template b/bugsink/conf_templates/docker.py.template index c7c4760..620a6c4 100644 --- a/bugsink/conf_templates/docker.py.template +++ b/bugsink/conf_templates/docker.py.template @@ -59,6 +59,12 @@ SNAPPEA = { "NUM_WORKERS": int(os.getenv("SNAPPEA_NUM_WORKERS", 2)), "STATS_RETENTION_MINUTES": int(os.getenv("SNAPPEA_STATS_RETENTION_MINUTES", 60 * 24 * 7)), + + # in our Dockerfile the foreman is started exactly once (no check against collisions needed) and whaterver is + # running the container is responsible for the container's lifecycle (again: no pid-file check needed to avoid + # collisions) + "PID_FILE": None, + } diff --git a/bugsink/conf_templates/singleserver.py.template b/bugsink/conf_templates/singleserver.py.template index c30b1dc..60804c6 100644 --- a/bugsink/conf_templates/singleserver.py.template +++ b/bugsink/conf_templates/singleserver.py.template @@ -43,7 +43,11 @@ SNAPPEA = { "TASK_ALWAYS_EAGER": False, "NUM_WORKERS": 4, - "PID_FILE": "{{ base_dir }}/snappea/snappea.pid", + "PID_FILE": None, + # alternatively (if you don't trust systemd to get at most one snappea foreman running; or if you don't use systemd + # at all), use the below: + # "PID_FILE": "{{ base_dir }}/snappea/snappea.pid", + "WAKEUP_CALLS_DIR": "{{ base_dir }}/snappea/wakeup", "STATS_RETENTION_MINUTES": 60 * 24 * 7, } diff --git a/bugsink/settings/development.py b/bugsink/settings/development.py index f8e7127..1e1c6c7 100644 --- a/bugsink/settings/development.py +++ b/bugsink/settings/development.py @@ -61,6 +61,7 @@ if not I_AM_RUNNING == "TEST": SNAPPEA = { "TASK_ALWAYS_EAGER": True, # at least for (unit) tests, this is a requirement "NUM_WORKERS": 1, + "PID_FILE": "/tmp/snappea.pid", # for development: a thing to 'tune' to None to test the no-pid-check branches. } EMAIL_HOST = os.getenv("EMAIL_HOST")