mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 09:46:28 +08:00
core: optimize database operation
This commit is contained in:
1 parent
7a164483ba
commit
0726dba492
3 files changed
+18
-2
No files matched your search
@@ -130,7 +130,7 @@ export async function apply(ctx: Context) {
|
||||
while (true) {
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
const res = await collEvent.findOneAndUpdate(
|
||||
{ ack: { $nin: [id] } },
|
||||
{ expire: { $gt: new Date() }, ack: { $nin: [id] } },
|
||||
{ $push: { ack: id } },
|
||||
);
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
|
||||
Reference in new issue
Block a user