mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: fix
This commit is contained in:
1 parent
8a8da0fba4
commit
fb47598c57
2 files changed
+3
-3
No files matched your search
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hydrooj",
|
"name": "hydrooj",
|
||||||
"version": "2.21.4",
|
"version": "2.21.5",
|
||||||
"bin": "bin/hydrooj.js",
|
"bin": "bin/hydrooj.js",
|
||||||
"main": "dist/loader.js",
|
"main": "dist/loader.js",
|
||||||
"typings": "dist/loader.d.ts",
|
"typings": "dist/loader.d.ts",
|
||||||
|
|||||||
@@ -68,10 +68,10 @@ export async function load(call: Entry) {
|
|||||||
storage.start(sopts);
|
storage.start(sopts);
|
||||||
require('../service/monitor');
|
require('../service/monitor');
|
||||||
for (const i of builtinModel) require(`../model/${i}`);
|
for (const i of builtinModel) require(`../model/${i}`);
|
||||||
const scripts = require('../upgrade');
|
const scripts = require('../upgrade').default;
|
||||||
let dbVer = (await modelSystem.get('db.ver')) ?? 0;
|
let dbVer = (await modelSystem.get('db.ver')) ?? 0;
|
||||||
const isFresh = !dbVer;
|
const isFresh = !dbVer;
|
||||||
const expected = scripts.default.length;
|
const expected = scripts.length;
|
||||||
while (dbVer < expected) {
|
while (dbVer < expected) {
|
||||||
logger.info('Upgrading database: from %d to %d', dbVer, expected);
|
logger.info('Upgrading database: from %d to %d', dbVer, expected);
|
||||||
if (isFresh) {
|
if (isFresh) {
|
||||||
|
|||||||
Reference in new issue
Block a user