Skip to content

Commit a5576e1

Browse files
committed
feat: remove config dump override
1 parent 296cf3e commit a5576e1

File tree

2 files changed

+0
-27
lines changed

2 files changed

+0
-27
lines changed

packages/beidou-core/lib/core/agent/index.js

-18
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,6 @@ class BeidouAgent extends egg.Agent {
2424
get [Symbol.for('egg#loader')]() {
2525
return AgentWorkerLoader;
2626
}
27-
28-
/**
29-
* 将 app.config 保存到 debug/${type}_config.json
30-
*/
31-
dumpConfig() {
32-
const rundir = (this.config && this.config.rundir) || 'run';
33-
const configdir = path.join(rundir, `${this.type}_${new Date().toString()}_config.json`);
34-
try {
35-
fs.existsSync(rundir) || fs.mkdirSync(rundir);
36-
fs.writeFileSync(configdir, JSON.stringify({
37-
config: this.config,
38-
plugins: this.plugins,
39-
}, null, 2));
40-
} catch (err) {
41-
/* istanbul ignore next */
42-
this.logger.warn(`duplicateConfig error: ${err.message} ${err.stack ? err.stack : ''}`);
43-
}
44-
}
4527
}
4628

4729
module.exports = BeidouAgent;

packages/beidou-core/lib/core/worker/index.js

-9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
const path = require('path');
22
const egg = require('egg');
3-
// const escapeRegExp = require('lodash/escapeRegExp');
43
const AppWorkerLoader = require('../loaders/app-worker-loader');
54

65
const DEPRECATE = Symbol('BeidouApplication#deprecate');
@@ -36,14 +35,6 @@ class BeidouApplication extends egg.Application {
3635
}
3736
return this[DEPRECATE];
3837
}
39-
40-
/*
41-
* override dumpConfig of egg, do it inside agent
42-
* @private
43-
*/
44-
dumpConfig() {
45-
46-
}
4738
}
4839

4940
module.exports = BeidouApplication;

0 commit comments

Comments
 (0)