added alerts collection dsql suggested
This commit is contained in:
1 parent
6ad9cf5d6d
commit
15acb97c86
2 files changed
+6
-66
No files matched your search
@@ -162,10 +162,10 @@ async def write_alert_ops(alert_ops: list[UpdateOne]):
|
||||
await get_collection(ALERTS_COLLECTION_NAME).bulk_write(
|
||||
alert_ops, ordered=False
|
||||
)
|
||||
except BulkWriteError as error:
|
||||
except BulkWriteError as exc:
|
||||
real_errors = [
|
||||
write_error
|
||||
for write_error in error.details["writeErrors"]
|
||||
for write_error in exc.details["writeErrors"]
|
||||
if write_error.get("code") != 11000
|
||||
]
|
||||
if real_errors:
|
||||
|
||||
Reference in new issue
Block a user