refactor: respect multi-tenancy

redis set/get don't consider site
This commit is contained in:
Ankush Menat 2024-01-04 15:43:10 +05:30
parent 807cfd66f1
commit 71908f1e00

View file

@ -510,10 +510,10 @@ class EmailAccount(Document):
self.set_failed_attempts_count(self.get_failed_attempts_count() + 1)
def set_failed_attempts_count(self, value):
frappe.cache.set(f"{self.name}:email-account-failed-attempts", value)
frappe.cache.set_value(f"{self.name}:email-account-failed-attempts", value)
def get_failed_attempts_count(self):
return cint(frappe.cache.get(f"{self.name}:email-account-failed-attempts"))
return cint(frappe.cache.get_value(f"{self.name}:email-account-failed-attempts"))
def receive(self):
"""Called by scheduler to receive emails from this EMail account using POP3/IMAP."""