Sfoglia il codice sorgente

[hotfix] set email queue status to Not Sent (#3941)

version-14
Makarand Bauskar 8 anni fa
committed by GitHub
parent
commit
965a7460ac
3 ha cambiato i file con 14 aggiunte e 0 eliminazioni
  1. +1
    -0
      frappe/patches.txt
  2. +0
    -0
      frappe/patches/v8_7/__init__.py
  3. +13
    -0
      frappe/patches/v8_7/update_email_queue_status.py

+ 1
- 0
frappe/patches.txt Vedi File

@@ -191,3 +191,4 @@ frappe.patches.v8_1.delete_custom_docperm_if_doctype_not_exists
frappe.patches.v8_5.delete_email_group_member_with_invalid_emails
frappe.patches.v8_x.update_user_permission
frappe.patches.v8_5.patch_event_colors
frappe.patches.v8_7.update_email_queue_status

+ 0
- 0
frappe/patches/v8_7/__init__.py Vedi File


+ 13
- 0
frappe/patches/v8_7/update_email_queue_status.py Vedi File

@@ -0,0 +1,13 @@
from __future__ import unicode_literals
import frappe
from frappe.email.smtp import get_default_outgoing_email_account

def execute():
# set the email queue status to Not Sent if google_analytics_id is UA-8911157-19
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":

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

Caricamento…
Annulla
Salva