@cronjobs.register
def update_collections_subscribers():
 d = CollectionWatcher.objects.values('collection_id').annotate(count=Count('collection')).extra(where=['DATE(created)=%s'], params=[date.today()])
 ts = [_update_collections_subscribers.subtask(args=[chunk]) for chunk in chunked(d, 1000)]
 TaskSet(ts).apply_async()

@ cronjobs . register def update_collections_subscribers ( ) : d = CollectionWatcher . objects . values ( 'collection_id' ) . annotate ( count = Count ( 'collection' ) ) . extra ( where = [ 'DATE(created)=%s' ] , params = [ date . today ( ) ] ) ts = [ _update_collections_subscribers . subtask ( args = [ chunk ] ) for chunk in chunked ( d , 1000 ) ] TaskSet ( ts ) . apply_async ( )
update collections subscribers totals .