Bläddra i källkod

[hotfix] daily_emails limit fixes (#3942)

version-14
Makarand Bauskar 8 år sedan
committed by GitHub
förälder
incheckning
7bf6c19a31
3 ändrade filer med 3 tillägg och 3 borttagningar
  1. +1
    -1
      frappe/commands/site.py
  2. +1
    -1
      frappe/email/queue.py
  3. +1
    -1
      frappe/patches/v8_7/update_email_queue_status.py

+ 1
- 1
frappe/commands/site.py Visa fil

@@ -460,7 +460,7 @@ def _set_limits(context, site, limits):
elif limit=='space':
value = float(value)

elif limit in ('users', 'emails', 'email_group'):
elif limit in ('users', 'emails', 'email_group', 'daily_emails'):
value = int(value)

new_limits[limit] = value


+ 1
- 1
frappe/email/queue.py Visa fil

@@ -218,7 +218,7 @@ def check_email_limit(recipients):
or frappe.flags.in_test):

monthly_email_limit = frappe.conf.get('limits', {}).get('emails')
daily_email_limit = frappe.conf.get('limits', {}).get('daily_emails')
daily_email_limit = cint(frappe.conf.get('limits', {}).get('daily_emails'))

if frappe.flags.in_test:
monthly_email_limit = 500


+ 1
- 1
frappe/patches/v8_7/update_email_queue_status.py Visa fil

@@ -7,7 +7,7 @@ def execute():
default_email_account = get_default_outgoing_email_account()

if frappe.conf.get("google_analytics_id") == "UA-8911157-19" or \
default_email_account.email_id == "notifications@erpnext.com":
(default_email_account and default_email_account.email_id == "notifications@erpnext.com"):

frappe.db.sql("""update `tabEmail Queue` set status='Not Sent' where
creation>=DATE_SUB(NOW(), INTERVAL 16 HOUR)""")

Laddar…
Avbryt
Spara