pandora/pandora/websocket/__init__.py
2018-06-19 08:33:26 +02:00

11 lines
256 B
Python

# -*- coding: utf-8 -*-
from celery.execute import send_task
from django.conf import settings
key = 'websocket'
def trigger_event(event, data):
if settings.WEBSOCKET:
send_task('trigger_event', [event, data], exchange=key, routing_key=key)