mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 15:03:34 +00:00
Don't send notifications if we don't have a Tornado server
This is the case when running the backend tests. (imported from commit 8c69c4b6ec72b36f0e90b06f75a010e993c46e03)
This commit is contained in:
@@ -273,9 +273,10 @@ def process_notification(data):
|
||||
# different types and for compatibility with non-HTTP transports.
|
||||
|
||||
def send_notification_http(data):
|
||||
requests.post(settings.TORNADO_SERVER + '/notify_tornado', data=dict(
|
||||
data = simplejson.dumps(data),
|
||||
secret = settings.SHARED_SECRET))
|
||||
if settings.TORNADO_SERVER:
|
||||
requests.post(settings.TORNADO_SERVER + '/notify_tornado', data=dict(
|
||||
data = simplejson.dumps(data),
|
||||
secret = settings.SHARED_SECRET))
|
||||
|
||||
def send_notification(data):
|
||||
return queue_json_publish("notify_tornado", data, send_notification_http)
|
||||
|
||||
Reference in New Issue
Block a user