From b5b98ffaa3927f1580e97837e5e93fdd320bbd78 Mon Sep 17 00:00:00 2001 From: Valentin Samir Date: Fri, 25 Jan 2013 20:24:28 +0100 Subject: [PATCH] =?UTF-8?q?[config]=20Le=20d=C3=A9bit=20de=20la=20connexio?= =?UTF-8?q?n=20est=20aussi=20de=20500Mbps=20le=20week-end?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ignore-this: 536031edbf47073e5cf5747a70bbe04e darcs-hash:20130125192428-3a55a-81c88c4ebc3eb66cdc25698f442ae72335832b4c.gz --- gestion/config.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gestion/config.py b/gestion/config.py index d65c802b..50c27cee 100644 --- a/gestion/config.py +++ b/gestion/config.py @@ -345,11 +345,12 @@ class conf_fw: # Empiriquement, 95 correspond à un débit de 100Mbit/s # sur des outils tels que munin - if datetime.now().hour >= 6 and datetime.now().hour < 19: + now=datetime.now() + if now.hour >= 6 and now.hour < 19 and now.weekday() < 5: debit_max = 95 * 1024 / 8 # kbytes per second en connexion de jour debit_jour=True else: - debit_max = 500 * 1024 / 8 # connexion de nuit + debit_max = 500 * 1024 / 8 # connexion de nuit et du week-end debit_jour=False #~ debit_max = 95 * 1024 / 8 # connexion de nuit http://www.speedtest.net/result/2318350458.png