新设备
This commit is contained in:
parent
5df64d9db9
commit
c11f4569f6
@ -113,6 +113,11 @@ async def role_idx(request, rdb, data):
|
|||||||
# 新角色 编号
|
# 新角色 编号
|
||||||
if v == 1:
|
if v == 1:
|
||||||
data['properties']['role_idx'] = await rdb.execute('scard', key)
|
data['properties']['role_idx'] = await rdb.execute('scard', key)
|
||||||
|
device_key = f'{data["#app_id"]}_{distinct_id}'
|
||||||
|
res = await rdb.execute('set', device_key, 1,'Nx')
|
||||||
|
if res == b'OK':
|
||||||
|
data['properties']['is_new_device'] = 1
|
||||||
|
|
||||||
# sadd O(n)
|
# sadd O(n)
|
||||||
# if distinct_id:
|
# if distinct_id:
|
||||||
# key = f'{data["#app_id"]}_devices'
|
# key = f'{data["#app_id"]}_devices'
|
||||||
|
Loading…
Reference in New Issue
Block a user