max size + message

This commit is contained in:
Emmanuel 2022-03-14 13:10:34 +01:00
parent 1c3389b059
commit 8ba720ca39

View File

@ -9,9 +9,9 @@ bp = Blueprint("routes", __name__)
# -------------------------------------------------------------- # --------------------------------------------------------------
DIR = "/opt/installmgr/" DIR = "/opt/installmgr/"
REPOSIT_DIR = "/opt/installmgr/incoming_dumps" REPOSIT_DIR = "/opt/installmgr/incoming_dumps"
MAX_REPOSIT_SIZE = 100 * 20 * 1024 # kB (here, max 100 dumps of 20MB) MAX_REPOSIT_SIZE = 200 * 20 * 1024 # kB (here, max 200 dumps of 20MB)
ALERT_MAIL_FROM = "root@scodoc.iutv.univ-paris13.fr" ALERT_MAIL_FROM = "root@scodoc.org"
ALERT_MAIL_TO = "emmanuel.viennet@gmail.com" ALERT_MAIL_TO = "emmanuel.viennet@gmail.com"
LOG_FILENAME = os.path.join(DIR, "upload-dump-errors.log") LOG_FILENAME = os.path.join(DIR, "upload-dump-errors.log")
@ -58,6 +58,7 @@ def upload_scodoc9():
"sco_subversion": request.form.get("sco_subversion", ""), "sco_subversion": request.form.get("sco_subversion", ""),
"dump_filename": fulltime + "_" + clean_deptname + ".gz", "dump_filename": fulltime + "_" + clean_deptname + ".gz",
"dump_size": len(data), "dump_size": len(data),
"message" : request.form.get("message", ""),
"remote_addr": remote_addr, "remote_addr": remote_addr,
"remote_host": remote_host, "remote_host": remote_host,
} }