mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +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('../error');
|
||||
const config = require('../options')();
|
||||
if (!config) {
|
||||
if (!process.env.CI && !config) {
|
||||
logger.info('Starting setup');
|
||||
return require('./setup').load();
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ class MongoService implements BaseService {
|
||||
}
|
||||
this.opts = opts;
|
||||
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);
|
||||
this.started = true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user