playlists/tasks.py
def send_track_to_live_site(request):
    """View for task queue that tells chirpradio.org a new track was entered"""
    log.info('Pushing notifications for track %r' % request.POST['id'])
    success = [_push_notify('chirpradio.push.now-playing'),
               _push_notify('chirpradio.push.tweet-now-playing'),  # this calls a Google Cloud Function
               _push_notify('chirpradio.push.recently-played')]
    if all(success):
        return HttpResponse("OK")
    else:
        return HttpResponse("One or more push notifications failed",
                            status=500)
View for task queue that tells chirpradio.org a new track was entered
View for task queue that tells chirpradio.org a new track was entered
View for task queue that tells chirpradio . org a new track was entered
def send_track_to_live_site(request):
    log.info('Pushing notifications for track %r' % request.POST['id'])
    success = [_push_notify('chirpradio.push.now-playing'),
               _push_notify('chirpradio.push.tweet-now-playing'),  
               _push_notify('chirpradio.push.recently-played')]
    if all(success):
        return HttpResponse("OK")
    else:
        return HttpResponse("One or more push notifications failed",
                            status=500)
def send_track_to_live_site ( request ) : log . info ( 'Pushing notifications for track %r' % request . POST [ 'id' ] ) success = [ _push_notify ( 'chirpradio.push.now-playing' ) , _push_notify ( 'chirpradio.push.tweet-now-playing' ) , _push_notify ( 'chirpradio.push.recently-played' ) ] if all ( success ) : return HttpResponse ( "OK" ) else : return HttpResponse ( "One or more push notifications failed" , status = 500 )
View for task queue that tells chirpradio.org a new track was entered
View for task queue that tells chirpradio . org a new track was entered
"""View for task queue that tells chirpradio.org a new track was entered""" # this calls a Google Cloud Function
request