egg-development
Advanced tools
Comparing version
23
agent.js
@@ -11,2 +11,15 @@ 'use strict'; | ||
module.exports = agent => { | ||
// clean all timing json | ||
agent.beforeStart(async () => { | ||
const rundir = agent.config.rundir; | ||
const files = await fs.readdir(rundir); | ||
for (const file of files) { | ||
if (!/^(agent|application)_timing/.test(file)) continue; | ||
await rimraf(path.join(agent.config.rundir, file)); | ||
} | ||
}); | ||
// single process mode don't watch and reload | ||
if (agent.options && agent.options.mode === 'single') return; | ||
const logger = agent.logger; | ||
@@ -36,12 +49,2 @@ const baseDir = agent.config.baseDir; | ||
// clean all timing json | ||
agent.beforeStart(async () => { | ||
const rundir = agent.config.rundir; | ||
const files = await fs.readdir(rundir); | ||
for (const file of files) { | ||
if (!/^(agent|application)_timing/.test(file)) continue; | ||
await rimraf(path.join(agent.config.rundir, file)); | ||
} | ||
}); | ||
/** | ||
@@ -48,0 +51,0 @@ * reload app worker: |
2.4.2 / 2019-02-04 | ||
================== | ||
**fixes** | ||
* [[`1ea1c61`](http://github.com/eggjs/egg-development/commit/1ea1c618616e165da771c1bb4ff87f2abd0635b8)] - fix: don't reload in single process mode (#22) (Yiyu He <<dead_horse@qq.com>>) | ||
2.4.1 / 2018-08-02 | ||
@@ -3,0 +9,0 @@ ================== |
{ | ||
"name": "egg-development", | ||
"version": "2.4.1", | ||
"version": "2.4.2", | ||
"description": "development tool for egg", | ||
@@ -36,3 +36,4 @@ "eggPlugin": { | ||
"mz": "^2.7.0", | ||
"mz-modules": "^2.0.0" | ||
"mz-modules": "^2.0.0", | ||
"supertest": "^3.4.2" | ||
}, | ||
@@ -59,3 +60,2 @@ "engines": { | ||
"app", | ||
"lib", | ||
"config", | ||
@@ -62,0 +62,0 @@ "agent.js", |
132
1.54%12306
-4.53%10
11.11%8
-11.11%