playlists/tasks.py
def play_count_snapshot(request):
    """Cron view to create a play count snapshot (top 40)."""
    qs = PlayCount.all().order('-play_count')
    results = []
    for count in qs.fetch(40):
        results.append(PlayCountSnapshot.create_from_count(count))
    for res in results:
        res.get_result()  # wait for result
    log.info('Created play count snapshot')
Cron view to create a play count snapshot (top 40).
Cron view to create a play count snapshot (top 40).
Cron view to create a play count snapshot ( top 40 ) .
def play_count_snapshot(request):
    qs = PlayCount.all().order('-play_count')
    results = []
    for count in qs.fetch(40):
        results.append(PlayCountSnapshot.create_from_count(count))
    for res in results:
        res.get_result()  
    log.info('Created play count snapshot')
def play_count_snapshot ( request ) : qs = PlayCount . all ( ) . order ( '-play_count' ) results = [ ] for count in qs . fetch ( 40 ) : results . append ( PlayCountSnapshot . create_from_count ( count ) ) for res in results : res . get_result ( ) log . info ( 'Created play count snapshot' )
Cron view to create a play count snapshot (top 40).
Cron view to create a play count snapshot ( top 40 ) .
"""Cron view to create a play count snapshot (top 40).""" # wait for result
request