Commit 13a7f2f6 authored by HERBERT Ryan's avatar HERBERT Ryan

modules/vidjil_utils.py mail not accessible

mail variable from db model not available here. Temporarily disable
notification email.
parent c91210bf
......@@ -418,9 +418,9 @@ def check_enough_space(directory):
device, size, used, available, percent, mountpoint = output.split("\n")[1].split()
available = int(available)
size = int(size)
if not result:
mail.send(to=defs.ADMIN_EMAILS,
subject="[Vidjil] Server space",
message="The space in directory %s has passed below %d\%." % directory, defs.FS_LOCK_THRESHHOLD)
result = available >= (size * (defs.FS_LOCK_THRESHHOLD/100))
#if not result:
# mail.send(to=defs.ADMIN_EMAILS,
# subject="[Vidjil] Server space",
# message="The space in directory %s has passed below %d\%." % (directory, defs.FS_LOCK_THRESHHOLD))
return result
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment