comms: serialize guest renamer inserts
This commit is contained in:
parent
41a762d6a6
commit
a272a219a4
@ -7,6 +7,7 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
schedule: "*/1 * * * *"
|
schedule: "*/1 * * * *"
|
||||||
suspend: false
|
suspend: false
|
||||||
|
concurrencyPolicy: Forbid
|
||||||
successfulJobsHistoryLimit: 1
|
successfulJobsHistoryLimit: 1
|
||||||
failedJobsHistoryLimit: 1
|
failedJobsHistoryLimit: 1
|
||||||
jobTemplate:
|
jobTemplate:
|
||||||
@ -321,7 +322,8 @@ spec:
|
|||||||
if not new:
|
if not new:
|
||||||
continue
|
continue
|
||||||
cur.execute(
|
cur.execute(
|
||||||
"INSERT INTO profiles (user_id, displayname, full_user_id) VALUES (%s, %s, %s)",
|
"INSERT INTO profiles (user_id, displayname, full_user_id) VALUES (%s, %s, %s) "
|
||||||
|
"ON CONFLICT (full_user_id) DO UPDATE SET displayname = EXCLUDED.displayname",
|
||||||
(localpart, new, full_user_id),
|
(localpart, new, full_user_id),
|
||||||
)
|
)
|
||||||
finally:
|
finally:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user