Пример #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)