forked from ScoDoc/installmgr
fix version
This commit is contained in:
parent
1ebd1bd7b0
commit
2de03687f6
@ -24,6 +24,7 @@ def last_stable_version():
|
|||||||
# LAST_RELEASE_TAG=$(curl "$GITEA_RELEASE_URL" | jq ".[].tag_name" | tr -d -c "0-9.\n" | sort --version-sort | tail -1)
|
# LAST_RELEASE_TAG=$(curl "$GITEA_RELEASE_URL" | jq ".[].tag_name" | tr -d -c "0-9.\n" | sort --version-sort | tail -1)
|
||||||
return "9.0.30"
|
return "9.0.30"
|
||||||
|
|
||||||
|
|
||||||
@bp.route("/scodoc-installmgr/upload-dump", methods=["POST"])
|
@bp.route("/scodoc-installmgr/upload-dump", methods=["POST"])
|
||||||
def upload_scodoc9():
|
def upload_scodoc9():
|
||||||
"""Réception d'un fichier de dump"""
|
"""Réception d'un fichier de dump"""
|
||||||
@ -53,7 +54,7 @@ def upload_scodoc9():
|
|||||||
"serial": request.form["serial"],
|
"serial": request.form["serial"],
|
||||||
"sco_user": request.form["sco_user"],
|
"sco_user": request.form["sco_user"],
|
||||||
"sent_by": request.form["sent_by"],
|
"sent_by": request.form["sent_by"],
|
||||||
"sco_version": request.form.get("sco_version", ""), # release
|
"sco_version": request.form.get("sco_version", ""), # release
|
||||||
"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),
|
||||||
@ -65,7 +66,11 @@ def upload_scodoc9():
|
|||||||
json_descr = json.dumps(D, sort_keys=True, indent=4)
|
json_descr = json.dumps(D, sort_keys=True, indent=4)
|
||||||
# --- Check disk space
|
# --- Check disk space
|
||||||
|
|
||||||
cur_size = int(subprocess.check_output(["du", "-skx", REPOSIT_DIR]).decode("utf-8").split("\t")[0])
|
cur_size = int(
|
||||||
|
subprocess.check_output(["du", "-skx", REPOSIT_DIR])
|
||||||
|
.decode("utf-8")
|
||||||
|
.split("\t")[0]
|
||||||
|
)
|
||||||
if (cur_size + len(data) / 1024) > MAX_REPOSIT_SIZE:
|
if (cur_size + len(data) / 1024) > MAX_REPOSIT_SIZE:
|
||||||
# out of space !
|
# out of space !
|
||||||
log.write(
|
log.write(
|
||||||
@ -106,12 +111,10 @@ def upload_scodoc9():
|
|||||||
except:
|
except:
|
||||||
log.write("exception while sending email !\n")
|
log.write("exception while sending email !\n")
|
||||||
|
|
||||||
|
|
||||||
log.close()
|
log.close()
|
||||||
return "Données envoyées."
|
return "Données envoyées."
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@bp.route("/scodoc-installmgr/scodoc9")
|
@bp.route("/scodoc-installmgr/scodoc9")
|
||||||
def scodoc9():
|
def scodoc9():
|
||||||
"""
|
"""
|
||||||
@ -174,4 +177,4 @@ def version():
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
f.close()
|
f.close()
|
||||||
return serial
|
return str(serial)
|
||||||
|
Loading…
Reference in New Issue
Block a user