From aff19ed199691ab5f9cdfa3c46f915b100ac9a34 Mon Sep 17 00:00:00 2001 From: Cherif Date: Thu, 12 Feb 2026 10:19:47 +0100 Subject: [PATCH] 12/02/26 - 10h30 Signed-off-by: Cherif --- .idea/workspace.xml | 13 +++--- GlobalVariable.py | 9 ++++- Job_Cron.py | 18 ++++++--- Log/log_file.log | 96 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 123 insertions(+), 13 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 0ccaac6..188900f 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -4,12 +4,11 @@ - @@ -520,6 +518,7 @@ - \ No newline at end of file diff --git a/GlobalVariable.py b/GlobalVariable.py index 1d51b16..d4e6800 100644 --- a/GlobalVariable.py +++ b/GlobalVariable.py @@ -1157,4 +1157,11 @@ Type de mobilité d'un apprenant "", "label": "", """ -APPRENANT_MOBILITE = ["pied", "velo", "voiture", "transport", "autre", ""] \ No newline at end of file +APPRENANT_MOBILITE = ["pied", "velo", "voiture", "transport", "autre", ""] + + +""" +Nombre de relance maximum autorisé par le systeme +Quelque soit la configuration d'un utilisateur +""" +SYSTEM_MAX_RELANCE = 10 \ No newline at end of file diff --git a/Job_Cron.py b/Job_Cron.py index 5dae17f..0641274 100644 --- a/Job_Cron.py +++ b/Job_Cron.py @@ -330,7 +330,9 @@ def Cron_Quotation_Relance(): datetime.strptime(str(todays_date), '%d/%m/%Y') - if( is_quotation_validated == 0 and relance_done <= nb_limite_relance and datetime.strptime(str(todays_date), '%d/%m/%Y') >= datetime.strptime( str(new_relance_date_no_ISODATE).strip(), '%d/%m/%Y') ): + if( is_quotation_validated == 0 and relance_done <= nb_limite_relance + and relance_done <= MYSY_GV.SYSTEM_MAX_RELANCE + and datetime.strptime(str(todays_date), '%d/%m/%Y') >= datetime.strptime( str(new_relance_date_no_ISODATE).strip(), '%d/%m/%Y') ): """ On fait le traitement, on envoie le mail @@ -3309,6 +3311,8 @@ def Cron_Survey_Questionnaires_Relance_Except_Q_Position(): print(" ### config_frequence_relance_auto = ", config_frequence_relance_auto) print(" ### config_nb_relance_auto = ", config_nb_relance_auto) + + relance_done = 0 if ("nb_relance" in local_questionnaire.keys() and local_questionnaire['nb_relance']): @@ -3329,8 +3333,9 @@ def Cron_Survey_Questionnaires_Relance_Except_Q_Position(): datetime.strptime(str(todays_date), '%d/%m/%Y') - if (config_relance_auto == "1" and relance_done <= float( - config_frequence_relance_auto) and datetime.strptime( + if (config_relance_auto == "1" and relance_done <= float(config_frequence_relance_auto) + and relance_done <= MYSY_GV.SYSTEM_MAX_RELANCE + and datetime.strptime( str(todays_date), '%d/%m/%Y') >= datetime.strptime(str(new_relance_date_no_ISODATE).strip(), '%d/%m/%Y')): @@ -3532,7 +3537,8 @@ def Cron_Emargement_Relance_old(): print(" ### datetime.strptime(str(new_relance_date_no_ISODATE).strip(), '%d/%m/%Y') = ", datetime.strptime(str(new_relance_date_no_ISODATE).strip(), '%d/%m/%Y')) - if ( relance_done <= nb_limite_relance and datetime.strptime( + if ( relance_done <= nb_limite_relance and relance_done <= MYSY_GV.SYSTEM_MAX_RELANCE + and datetime.strptime( str(todays_date), '%d/%m/%Y') >= datetime.strptime(str(new_relance_date_no_ISODATE).strip(), '%d/%m/%Y')): @@ -3756,7 +3762,9 @@ def Cron_Emargement_Relance(): datetime.strptime(str(new_relance_date_no_ISODATE).strip(), '%d/%m/%Y')) - if (config_relance_auto == "1" and relance_done <= float(config_nb_relance_auto) and datetime.strptime( + if (config_relance_auto == "1" and relance_done <= float(config_nb_relance_auto) + and relance_done <= MYSY_GV.SYSTEM_MAX_RELANCE + and datetime.strptime( str(todays_date), '%d/%m/%Y') >= datetime.strptime(str(new_relance_date_no_ISODATE).strip(), '%d/%m/%Y')): diff --git a/Log/log_file.log b/Log/log_file.log index 8f841d7..92c69e7 100644 --- a/Log/log_file.log +++ b/Log/log_file.log @@ -27655,3 +27655,99 @@ INFO:root:2026-02-12 10:09:26.799927 : Security check : IP adresse '127.0.0.1' INFO:werkzeug:127.0.0.1 - - [12/Feb/2026 10:09:26] "GET /myclass/api/Get_Given_bloc_competence HTTP/1.1" 308 - INFO:root:2026-02-12 10:09:26.806956 : Security check : IP adresse '127.0.0.1' connected INFO:werkzeug:127.0.0.1 - - [12/Feb/2026 10:09:26] "GET /myclass/api/Get_Given_bloc_competence/ HTTP/1.1" 200 - +INFO:werkzeug: * Detected change in 'C:\\Users\\Cherif\\Documents\\myclass.com\\Siteweb\\Elyos_Ftion_Initiale\\Ela_back\\Back_Office_FI\\GlobalVariable.py', reloading +INFO:werkzeug: * Restarting with stat +DEBUG:matplotlib:matplotlib data path: C:\Users\Cherif\Documents\myclass.com\Siteweb\Elyos_Ftion_Continue\Ela_back\Back_Office\venv\Lib\site-packages\matplotlib\mpl-data +DEBUG:matplotlib:CONFIGDIR=C:\Users\Cherif\.matplotlib +DEBUG:matplotlib:interactive is False +DEBUG:matplotlib:platform is win32 +DEBUG:matplotlib:CACHEDIR=C:\Users\Cherif\.matplotlib +DEBUG:matplotlib.font_manager:Using fontManager instance from C:\Users\Cherif\.matplotlib\fontlist-v390.json +INFO:root:2026-02-12 10:14:04.139253 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++ +INFO:root:2026-02-12 10:14:04.139253 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev_fi ++ +INFO:root:2026-02-12 10:14:04.139253 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev_fi') ++ +INFO:root:2026-02-12 10:14:04.139253 : ++ FLASK PORT 5001 ++ +INFO:root:2026-02-12 10:14:04.139253 : ++ LMS_BAS_URL mysy-hosting.com/ ++ +WARNING:werkzeug: * Debugger is active! +INFO:werkzeug: * Debugger PIN: 479-264-725 +INFO:werkzeug: * Detected change in 'C:\\Users\\Cherif\\Documents\\myclass.com\\Siteweb\\Elyos_Ftion_Initiale\\Ela_back\\Back_Office_FI\\GlobalVariable.py', reloading +INFO:werkzeug: * Restarting with stat +DEBUG:matplotlib:matplotlib data path: C:\Users\Cherif\Documents\myclass.com\Siteweb\Elyos_Ftion_Continue\Ela_back\Back_Office\venv\Lib\site-packages\matplotlib\mpl-data +DEBUG:matplotlib:CONFIGDIR=C:\Users\Cherif\.matplotlib +DEBUG:matplotlib:interactive is False +DEBUG:matplotlib:platform is win32 +DEBUG:matplotlib:CACHEDIR=C:\Users\Cherif\.matplotlib +DEBUG:matplotlib.font_manager:Using fontManager instance from C:\Users\Cherif\.matplotlib\fontlist-v390.json +INFO:root:2026-02-12 10:15:03.993749 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++ +INFO:root:2026-02-12 10:15:03.993749 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev_fi ++ +INFO:root:2026-02-12 10:15:03.993749 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev_fi') ++ +INFO:root:2026-02-12 10:15:03.993749 : ++ FLASK PORT 5001 ++ +INFO:root:2026-02-12 10:15:03.993749 : ++ LMS_BAS_URL mysy-hosting.com/ ++ +WARNING:werkzeug: * Debugger is active! +INFO:werkzeug: * Debugger PIN: 479-264-725 +INFO:werkzeug: * Detected change in 'C:\\Users\\Cherif\\Documents\\myclass.com\\Siteweb\\Elyos_Ftion_Initiale\\Ela_back\\Back_Office_FI\\Job_Cron.py', reloading +INFO:werkzeug: * Restarting with stat +DEBUG:matplotlib:matplotlib data path: C:\Users\Cherif\Documents\myclass.com\Siteweb\Elyos_Ftion_Continue\Ela_back\Back_Office\venv\Lib\site-packages\matplotlib\mpl-data +DEBUG:matplotlib:CONFIGDIR=C:\Users\Cherif\.matplotlib +DEBUG:matplotlib:interactive is False +DEBUG:matplotlib:platform is win32 +DEBUG:matplotlib:CACHEDIR=C:\Users\Cherif\.matplotlib +DEBUG:matplotlib.font_manager:Using fontManager instance from C:\Users\Cherif\.matplotlib\fontlist-v390.json +INFO:root:2026-02-12 10:15:27.197564 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++ +INFO:root:2026-02-12 10:15:27.197564 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev_fi ++ +INFO:root:2026-02-12 10:15:27.197564 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev_fi') ++ +INFO:root:2026-02-12 10:15:27.197564 : ++ FLASK PORT 5001 ++ +INFO:root:2026-02-12 10:15:27.197564 : ++ LMS_BAS_URL mysy-hosting.com/ ++ +WARNING:werkzeug: * Debugger is active! +INFO:werkzeug: * Debugger PIN: 479-264-725 +INFO:werkzeug: * Detected change in 'C:\\Users\\Cherif\\Documents\\myclass.com\\Siteweb\\Elyos_Ftion_Initiale\\Ela_back\\Back_Office_FI\\Job_Cron.py', reloading +INFO:werkzeug: * Restarting with stat +DEBUG:matplotlib:matplotlib data path: C:\Users\Cherif\Documents\myclass.com\Siteweb\Elyos_Ftion_Continue\Ela_back\Back_Office\venv\Lib\site-packages\matplotlib\mpl-data +DEBUG:matplotlib:CONFIGDIR=C:\Users\Cherif\.matplotlib +DEBUG:matplotlib:interactive is False +DEBUG:matplotlib:platform is win32 +DEBUG:matplotlib:CACHEDIR=C:\Users\Cherif\.matplotlib +DEBUG:matplotlib.font_manager:Using fontManager instance from C:\Users\Cherif\.matplotlib\fontlist-v390.json +INFO:root:2026-02-12 10:17:02.319755 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++ +INFO:root:2026-02-12 10:17:02.319755 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev_fi ++ +INFO:root:2026-02-12 10:17:02.319755 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev_fi') ++ +INFO:root:2026-02-12 10:17:02.319755 : ++ FLASK PORT 5001 ++ +INFO:root:2026-02-12 10:17:02.319755 : ++ LMS_BAS_URL mysy-hosting.com/ ++ +WARNING:werkzeug: * Debugger is active! +INFO:werkzeug: * Debugger PIN: 479-264-725 +INFO:werkzeug: * Detected change in 'C:\\Users\\Cherif\\Documents\\myclass.com\\Siteweb\\Elyos_Ftion_Initiale\\Ela_back\\Back_Office_FI\\Job_Cron.py', reloading +INFO:werkzeug: * Restarting with stat +DEBUG:matplotlib:matplotlib data path: C:\Users\Cherif\Documents\myclass.com\Siteweb\Elyos_Ftion_Continue\Ela_back\Back_Office\venv\Lib\site-packages\matplotlib\mpl-data +DEBUG:matplotlib:CONFIGDIR=C:\Users\Cherif\.matplotlib +DEBUG:matplotlib:interactive is False +DEBUG:matplotlib:platform is win32 +DEBUG:matplotlib:CACHEDIR=C:\Users\Cherif\.matplotlib +DEBUG:matplotlib.font_manager:Using fontManager instance from C:\Users\Cherif\.matplotlib\fontlist-v390.json +DEBUG:matplotlib:matplotlib data path: C:\Users\Cherif\Documents\myclass.com\Siteweb\Elyos_Ftion_Continue\Ela_back\Back_Office\venv\Lib\site-packages\matplotlib\mpl-data +DEBUG:matplotlib:CONFIGDIR=C:\Users\Cherif\.matplotlib +DEBUG:matplotlib:interactive is False +DEBUG:matplotlib:platform is win32 +DEBUG:matplotlib:CACHEDIR=C:\Users\Cherif\.matplotlib +DEBUG:matplotlib.font_manager:Using fontManager instance from C:\Users\Cherif\.matplotlib\fontlist-v390.json +INFO:root:2026-02-12 10:18:25.321206 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++ +INFO:root:2026-02-12 10:18:25.321206 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev_fi ++ +INFO:root:2026-02-12 10:18:25.321206 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev_fi') ++ +INFO:root:2026-02-12 10:18:25.321206 : ++ FLASK PORT 5001 ++ +INFO:root:2026-02-12 10:18:25.321206 : ++ LMS_BAS_URL mysy-hosting.com/ ++ +INFO:werkzeug:WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead. + * Running on http://localhost:5001 +INFO:werkzeug:Press CTRL+C to quit +INFO:werkzeug: * Restarting with stat +DEBUG:matplotlib:matplotlib data path: C:\Users\Cherif\Documents\myclass.com\Siteweb\Elyos_Ftion_Continue\Ela_back\Back_Office\venv\Lib\site-packages\matplotlib\mpl-data +DEBUG:matplotlib:CONFIGDIR=C:\Users\Cherif\.matplotlib +DEBUG:matplotlib:interactive is False +DEBUG:matplotlib:platform is win32 +DEBUG:matplotlib:CACHEDIR=C:\Users\Cherif\.matplotlib +DEBUG:matplotlib.font_manager:Using fontManager instance from C:\Users\Cherif\.matplotlib\fontlist-v390.json +INFO:root:2026-02-12 10:18:31.999353 : ++++ ENVIRONNEMENT DEVELOPPEMENT ++++ +INFO:root:2026-02-12 10:18:32.000352 : ++ DATABASE mongodb://localhost:27017/cherifdb_dev_fi ++ +INFO:root:2026-02-12 10:18:32.000352 : ++ DBNAME Database(MongoClient(host=['localhost:27017'], document_class=dict, tz_aware=False, connect=True), 'cherifdb_dev_fi') ++ +INFO:root:2026-02-12 10:18:32.000352 : ++ FLASK PORT 5001 ++ +INFO:root:2026-02-12 10:18:32.000352 : ++ LMS_BAS_URL mysy-hosting.com/ ++ +WARNING:werkzeug: * Debugger is active! +INFO:werkzeug: * Debugger PIN: 479-264-725