From f00b0daadba43de3d049378a77cc82237f3cec58 Mon Sep 17 00:00:00 2001 From: Justin Haze Date: Mon, 8 Jul 2019 09:35:34 -0600 Subject: [PATCH] Made MAX_TASK_RESULTS environment variable --- docker-compose.yml | 1 + src/sensor/settings.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index bd721eb2..e2b1adad 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -42,6 +42,7 @@ services: - MOCK_RADIO - MOCK_RADIO_RANDOM - CALLBACK_SSL_VERIFICATION + - MAX_TASK_RESULTS expose: - '8000' volumes: diff --git a/src/sensor/settings.py b/src/sensor/settings.py index bcfb9f0f..8c947c11 100644 --- a/src/sensor/settings.py +++ b/src/sensor/settings.py @@ -272,7 +272,7 @@ DATABASES["default"]["HOST"] = "localhost" # Ensure only the last MAX_TASK_RESULTS results are kept per schedule entry -MAX_TASK_RESULTS = 100000 +MAX_TASK_RESULTS = env.int("MAX_TASK_RESULTS", default=100000) # Display at most MAX_TASK_QUEUE upcoming tasks in /tasks/upcoming MAX_TASK_QUEUE = 50