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"""
|
||||||
@ -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