Browse Source

mode=reset_quota api call returned nothing

Closes #1661
pull/1666/head
Safihre 5 years ago
parent
commit
be26c7f080
  1. 1
      sabnzbd/api.py
  2. 2
      sabnzbd/bpsmeter.py

1
sabnzbd/api.py

@ -719,6 +719,7 @@ def _api_retry_all(name, output, kwargs):
def _api_reset_quota(name, output, kwargs):
""" Reset quota left """
sabnzbd.BPSMeter.reset_quota(force=True)
return report(output)
def _api_test_email(name, output, kwargs):

2
sabnzbd/bpsmeter.py

@ -347,7 +347,7 @@ class BPSMeter:
def reset_quota(self, force=False):
"""Check if it's time to reset the quota, optionally resuming
Return True, when still paused
Return True, when still paused or should be paused
"""
if force or (self.have_quota and time.time() > (self.q_time - 50)):
self.quota = self.left = cfg.quota_size.get_float()

Loading…
Cancel
Save