Переглянути джерело

do not hard exit when memory exceeds the threshold

Son NK 4 роки тому
батько
коміт
e661f90ce7
1 змінених файлів з 0 додано та 5 видалено
  1. 0 5
      app/pgp_utils.py

+ 0 - 5
app/pgp_utils.py

@@ -37,11 +37,6 @@ def encrypt_file(data: BytesIO, fingerprint: str) -> str:
     mem_usage = memory_usage(-1, interval=1, timeout=1)[0]
     mem_usage = memory_usage(-1, interval=1, timeout=1)[0]
     LOG.d("mem_usage %s", mem_usage)
     LOG.d("mem_usage %s", mem_usage)
 
 
-    # todo
-    if mem_usage > 300:
-        LOG.exception("Force exit")
-        hard_exit()
-
     r = gpg.encrypt_file(data, fingerprint, always_trust=True)
     r = gpg.encrypt_file(data, fingerprint, always_trust=True)
     if not r.ok:
     if not r.ok:
         # maybe the fingerprint is not loaded on this host, try to load it
         # maybe the fingerprint is not loaded on this host, try to load it