コード例 #1
0
def preload_explore_comment_ids():
    redis.delete('explore_comment_ids_temp')

    ids = explore_comment_ids()

    for id_ in ids:
        redis.sadd('explore_comment_ids_temp', id_)

    if ids:
        redis.rename('explore_comment_ids_temp', 'explore_comment_ids')
コード例 #2
0
def preload_explore_comment_ids():
    redis.delete('explore_comment_ids_temp')

    ids = explore_comment_ids()

    for id_ in ids:
        redis.sadd('explore_comment_ids_temp', id_)

    if ids:
        redis.rename('explore_comment_ids_temp', 'explore_comment_ids')
    def forwards(self, orm):
        try:
            redis.rename('recent_threads', 'global:recent')
        except:
            print 'unable to rename master'

        for tag in orm.Hashtag.objects.all():
            orig = 'canvas:%s' % tag.name
            try:
                redis.rename('%srecent' % orig, '%s:recent' % orig)
            except:
                print 'key for %s was not found' % tag.name
コード例 #4
0
    def forwards(self, orm):
        try:
            redis.rename('recent_threads', 'global:recent')
        except:
            print 'unable to rename master'

        for tag in orm.Hashtag.objects.all():
            orig = 'canvas:%s' % tag.name
            try:
                redis.rename('%srecent' % orig, '%s:recent' % orig)
            except:
                print 'key for %s was not found' % tag.name