select for update
This commit is contained in:
parent
a111aaac46
commit
c7e316ab22
1 changed files with 5 additions and 4 deletions
|
@ -474,7 +474,8 @@ def removePeering(data):
|
||||||
if len(data.get('id', '')) not in (16, 43):
|
if len(data.get('id', '')) not in (16, 43):
|
||||||
logger.debug('invalid user id')
|
logger.debug('invalid user id')
|
||||||
return {}
|
return {}
|
||||||
u = models.User.get_or_create(data['id'])
|
u = models.User.get(data['id'], for_udpate=True)
|
||||||
|
if u:
|
||||||
u.info['message'] = data.get('message', '')
|
u.info['message'] = data.get('message', '')
|
||||||
u.update_peering(False)
|
u.update_peering(False)
|
||||||
state.nodes.peer_queue(u.id, 'peering', 'removePeering')
|
state.nodes.peer_queue(u.id, 'peering', 'removePeering')
|
||||||
|
|
Loading…
Reference in a new issue