do not hard exit when memory exceeds the threshold
This commit is contained in:
parent
3a765ffc83
commit
e661f90ce7
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue