[fix] log newsletter sending error
diff --git a/erpnext/tasks.py b/erpnext/tasks.py
index 3c7acea..cef0ac9 100644
--- a/erpnext/tasks.py
+++ b/erpnext/tasks.py
@@ -4,6 +4,7 @@
from __future__ import unicode_literals
import frappe
from frappe.celery_app import celery_task, task_logger
+from frappe.utils.scheduler import log
@celery_task()
def send_newsletter(site, newsletter, event):
@@ -15,12 +16,16 @@
except:
frappe.db.rollback()
- task_logger.warn(frappe.get_traceback())
+
+ task_logger.error(site)
+ task_logger.error(frappe.get_traceback())
# wasn't able to send emails :(
doc.db_set("email_sent", 0)
frappe.db.commit()
+ log("send_newsletter")
+
raise
else: