Beispiel #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)
Beispiel #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})
Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #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})
Beispiel #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)
Beispiel #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)