# -*- coding: utf-8 -*-

from django_file_md5 import calculate_md5

from utils.redis.connect import r


def upload_lock(group_id, user_id, file_):
    return r.acquire_lock('{}:{}:{}'.format(group_id, user_id, calculate_md5(file_)))
