Auto-update: Tue Jul 30 15:22:09 PDT 2024
This commit is contained in:
parent
d7020c2a0a
commit
d2e54009e0
1 changed files with 8 additions and 6 deletions
|
@ -655,7 +655,8 @@ class APIConfig(BaseModel):
|
|||
{', '.join(f"{col} = EXCLUDED.{col}" for col in columns if col != 'id')}
|
||||
"""
|
||||
|
||||
# Execute the insert for each change
|
||||
# Execute the insert for all changes in a single transaction
|
||||
async with conn.transaction():
|
||||
affected_rows = 0
|
||||
for change in changes:
|
||||
values = [change[col] for col in columns]
|
||||
|
@ -670,6 +671,7 @@ class APIConfig(BaseModel):
|
|||
return 0
|
||||
|
||||
|
||||
|
||||
async def push_changes_to_all(self):
|
||||
for pool_entry in self.POOL:
|
||||
if pool_entry['ts_id'] != os.environ.get('TS_ID'):
|
||||
|
|
Loading…
Reference in a new issue