This commit is contained in:
parent
02fa8b83d2
commit
11b29da03a
|
@ -88,7 +88,8 @@ def save_add_contact_by_channel(data, corpinfo, *args, **kwargs):
|
||||||
now = datetime.now()
|
now = datetime.now()
|
||||||
nine_minute_ago = now - timedelta(minutes=9)
|
nine_minute_ago = now - timedelta(minutes=9)
|
||||||
uid = hook_user.uid
|
uid = hook_user.uid
|
||||||
rc = SimpleLock(f'{corpid}:{userid}:{externaluserid}')
|
createtime = data.get('createtime')
|
||||||
|
rc = SimpleLock(f'{corpid}:{userid}:{externaluserid}:{createtime}')
|
||||||
success = rc.try_lock(60 * 10)
|
success = rc.try_lock(60 * 10)
|
||||||
if hook_user.utime > nine_minute_ago and hook_user.new_user and success:
|
if hook_user.utime > nine_minute_ago and hook_user.new_user and success:
|
||||||
# 发送消息
|
# 发送消息
|
||||||
|
|
Loading…
Reference in New Issue