Browse Source

[hotfix] daily_emails limit fixes (#3942)

version-14
Makarand Bauskar 8 years ago
committed by GitHub
parent
commit
7bf6c19a31
3 changed files with 3 additions and 3 deletions
  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 View File

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


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


new_limits[limit] = value new_limits[limit] = value


+ 1
- 1
frappe/email/queue.py View File

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


monthly_email_limit = frappe.conf.get('limits', {}).get('emails') 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: if frappe.flags.in_test:
monthly_email_limit = 500 monthly_email_limit = 500


+ 1
- 1
frappe/patches/v8_7/update_email_queue_status.py View File

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


if frappe.conf.get("google_analytics_id") == "UA-8911157-19" or \ 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 frappe.db.sql("""update `tabEmail Queue` set status='Not Sent' where
creation>=DATE_SUB(NOW(), INTERVAL 16 HOUR)""") creation>=DATE_SUB(NOW(), INTERVAL 16 HOUR)""")

Loading…
Cancel
Save