Пример #1
0
def decrement_total_users():
    memcache_key = 'total-users'
    return sharding_counter.decrement(memcache_key)
Пример #2
0
def decrement_event_attendees_number(event_key, gender):
    if gender == 'Homme' or gender == 'male':
        gender = 'm' 
    else:  gender ='f'
    memcache_key = 'attendees-number-'+gender+'-'+event_key
    return sharding_counter.decrement(memcache_key)
Пример #3
0
def decrement_followers_number(user_id):
    memcache_key = 'followers-number-' + str(user_id)
    return sharding_counter.decrement(memcache_key)