fix: idempotent 加入request_path

This commit is contained in:
caoqianming 2023-03-24 16:38:51 +08:00
parent 503953bb11
commit ce90e11c36
1 changed files with 1 additions and 1 deletions

View File

@ -32,7 +32,7 @@ def idempotent(seconds=4):
def wrapper(*args, **kwargs):
rdata = args[1].data
rdata['request_userid'] = getattr(args[1], 'user').id
print(getattr(args[1], 'user'), rdata)
rdata['request_path'] = getattr(args[1], 'path')
hash_k = hash(json.dumps(rdata))
hash_v_e = cache.get(hash_k, None)
if hash_v_e is None: