From ca25a12be0354012bacc58974dc4741863d02ec6 Mon Sep 17 00:00:00 2001 From: imperosol Date: Thu, 10 Oct 2024 00:10:12 +0200 Subject: [PATCH] Increase the barmen timeout limit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit La limite actuelle est trop faible. En soirée, on s'en fout. Mais en journée, c'est terriblement chiant. Certains barmens passent leur temps à rafraichir la la page, certains mettent un rechargement auto à intervalles réguliers (ce qui tue le concept du timeout), et d'autres encore ont juste arrêté d'y prêter attention (mais le comptoir apparait alors comme fermé, et des étudiants qui auraient pu venir au Foyer ne viennent finalement pas) --- core/templates/core/base.jinja | 5 ++--- sith/settings.py | 5 +---- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/core/templates/core/base.jinja b/core/templates/core/base.jinja index d3007f60..cfa94908 100644 --- a/core/templates/core/base.jinja +++ b/core/templates/core/base.jinja @@ -73,9 +73,8 @@ Thus the barmen timeout is handled in the only place that is loaded on every page : the header bar. However, let's be clear : this has nothing to do here. - It's' merely a contrived workaround in order not to setup - a proper periodic task manager that has lived way too much. - As Hubert Bonisseur De La Batte said : "s'agirait de grandir"#} + It's' merely a contrived workaround that should + replaced by a proper task manager as soon as possible. #} {% set _ = Counter.objects.filter(type="BAR").handle_timeout() %} {% endcache %} {% for bar in Counter.objects.annotate_has_barman(user).annotate_is_open().filter(type="BAR") %} diff --git a/sith/settings.py b/sith/settings.py index 8a534cd2..cd70f49b 100644 --- a/sith/settings.py +++ b/sith/settings.py @@ -612,14 +612,11 @@ SITH_CLUB_ROLES = { SITH_MAXIMUM_FREE_ROLE = 1 # Minutes to timeout the logged barmen -SITH_BARMAN_TIMEOUT = 20 +SITH_BARMAN_TIMEOUT = 30 # Minutes to delete the last operations SITH_LAST_OPERATIONS_LIMIT = 10 -# Minutes for a counter to be inactive -SITH_COUNTER_MINUTE_INACTIVE = 10 - # ET variables SITH_EBOUTIC_CB_ENABLED = True SITH_EBOUTIC_ET_URL = (