mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
Github Oauth,支持自动转换config.ini配置
This commit is contained in:
1 parent
5707f973d7
commit
8476eac3b4
17 files changed
+240
-109
No files matched your search
@@ -7,9 +7,10 @@ async function update() {
|
||||
const [mid, $set] = await sysinfo.update();
|
||||
await coll.updateOne(
|
||||
{ mid, type: 'server' },
|
||||
{ $set: { ...$set, updateAt: new Date() } },
|
||||
{ $set: { ...$set, updateAt: new Date(), reqCount: global.Hydro.stat.reqCount } },
|
||||
{ upsert: true },
|
||||
);
|
||||
global.Hydro.stat.reqCount = 0;
|
||||
}
|
||||
|
||||
async function postInit() {
|
||||
@@ -19,7 +20,7 @@ async function postInit() {
|
||||
{ $set: { ...info, updateAt: new Date(), type: 'server' } },
|
||||
{ upsert: true },
|
||||
);
|
||||
setInterval(update, 3 * 60 * 1000);
|
||||
setInterval(update, 60 * 1000);
|
||||
}
|
||||
|
||||
global.Hydro.service.monitor = module.exports = { postInit };
|
||||
Reference in new issue
Block a user