[fix] use frappe.as_json in emit_via_redis
This commit is contained in:
parent
acc4252ce7
commit
09ebb908ad
1 changed files with 1 additions and 2 deletions
|
|
@ -11,7 +11,6 @@ import time
|
|||
import redis
|
||||
from functools import wraps
|
||||
from frappe.utils import get_site_path
|
||||
import json
|
||||
from frappe import conf
|
||||
|
||||
END_LINE = '<!-- frappe: end-file -->'
|
||||
|
|
@ -154,7 +153,7 @@ def emit_via_redis(event, message, room):
|
|||
r = get_redis_server()
|
||||
|
||||
try:
|
||||
r.publish('events', json.dumps({'event': event, 'message': message, 'room': room}))
|
||||
r.publish('events', frappe.as_json({'event': event, 'message': message, 'room': room}))
|
||||
except redis.exceptions.ConnectionError:
|
||||
pass
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue