mirror of
https://github.com/jlengrand/bugsink.git
synced 2026-03-10 08:01:17 +00:00
PID_FILE check: don't use in docker/systemd
As per the parent commit: the "small check" is not bullet-proof (as per #99) and in Docker/systemd environments it's better to leave the thing that's actually in charge of lifecycles in charge rather than reproduce that behavior. You can’t fail the check if you deliberately skipped it. Fix #99
This commit is contained in:
@@ -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,
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user