forked from 0x2620/pandora
11 lines
256 B
Python
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)
|