mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 17:46:28 +08:00
remove ensureindex api (use postInit instead)
This commit is contained in:
1 parent
be9d2bffb9
commit
e62e7b49a3
13 files changed
+56
-107
No files matched your search
@@ -19,8 +19,9 @@ export async function inc(op: string, ident: string, periodSecs: number, maxOper
|
||||
}
|
||||
}
|
||||
|
||||
export function ensureIndexes() {
|
||||
function ensureIndexes() {
|
||||
return coll.createIndex('expireAt', { expireAfterSeconds: 0 });
|
||||
}
|
||||
|
||||
global.Hydro.model.opcount = { inc, ensureIndexes };
|
||||
global.Hydro.postInit.push(ensureIndexes);
|
||||
global.Hydro.model.opcount = { inc };
|
||||
Reference in new issue
Block a user