示例#1
0
def notify_fanout_event_vidly_submissions(sender, instance, *args, **kwargs):
    if instance.event_id and not kwargs.get('created'):
        channel = 'event-vidlysubmissions-{}'.format(instance.event_id)
        send_fanout(channel, True)
示例#2
0
def notify_fanout_event_pictures(sender, instance, *args, **kwargs):
    if instance.event_id:
        channel = 'event-pictures-{}'.format(instance.event_id)
        send_fanout(channel, {'id': instance.id})
示例#3
0
def notify_fanout_event(sender, instance, **kwargs):
    if not kwargs['raw']:
        # any event has changed
        send_fanout('events', True)
        send_fanout('event-{}'.format(instance.id), True)
示例#4
0
def notify_fanout(sender, instance, **kwargs):
    event = instance.event
    # This channel must match `subscription_channel_comments` set in the
    # view class for holding the comments container.
    channel = 'comments-{}'.format(event.id)
    send_fanout(channel, instance.id)
示例#5
0
def notify_fanout_event(sender, instance, **kwargs):
    if not kwargs['raw']:
        # any event has changed
        send_fanout('events', True)
        send_fanout('event-{}'.format(instance.id), True)
示例#6
0
def notify_fanout_event_pictures(sender, instance, *args, **kwargs):
    if instance.event_id:
        channel = 'event-pictures-{}'.format(instance.event_id)
        send_fanout(channel, {'id': instance.id})
示例#7
0
def notify_fanout_event_vidly_submissions(sender, instance, *args, **kwargs):
    if instance.event_id and not kwargs.get('created'):
        channel = 'event-vidlysubmissions-{}'.format(instance.event_id)
        send_fanout(channel, True)
示例#8
0
def notify_fanout(sender, instance, **kwargs):
    event = instance.event
    # This channel must match `subscription_channel_comments` set in the
    # view class for holding the comments container.
    channel = 'comments-{}'.format(event.id)
    send_fanout(channel, True)