mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
core: ignore setup in CI mode
This commit is contained in:
1 parent
cfd4e03c82
commit
4fc08f3ba6
2 files changed
+2
-2
No files matched your search
@@ -22,7 +22,7 @@ export async function load() {
|
|||||||
require('../utils');
|
require('../utils');
|
||||||
require('../error');
|
require('../error');
|
||||||
const config = require('../options')();
|
const config = require('../options')();
|
||||||
if (!config) {
|
if (!process.env.CI && !config) {
|
||||||
logger.info('Starting setup');
|
logger.info('Starting setup');
|
||||||
return require('./setup').load();
|
return require('./setup').load();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ class MongoService implements BaseService {
|
|||||||
}
|
}
|
||||||
this.opts = opts;
|
this.opts = opts;
|
||||||
this.client = await MongoClient.connect(mongourl, { useNewUrlParser: true, useUnifiedTopology: true });
|
this.client = await MongoClient.connect(mongourl, { useNewUrlParser: true, useUnifiedTopology: true });
|
||||||
this.db = this.client.db(opts.name);
|
this.db = this.client.db(opts.name || 'hydro');
|
||||||
await bus.parallel('database/connect', this.db);
|
await bus.parallel('database/connect', this.db);
|
||||||
this.started = true;
|
this.started = true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user