* run in master
(argv)
| 126 | * run in master |
| 127 | */ |
| 128 | runInMaster(argv) { |
| 129 | return think.beforeStartServer().catch(err => { |
| 130 | think.logger.error(err); |
| 131 | }).then(() => { |
| 132 | const instance = this._getMasterInstance(argv); |
| 133 | return instance.startServer(); |
| 134 | }).then(() => { |
| 135 | think.app.emit('appReady'); |
| 136 | }); |
| 137 | } |
| 138 | _getWorkerInstance(argv) { |
| 139 | const port = argv.port || think.config('port'); |
| 140 | const instance = new thinkCluster.Worker({ |
no test coverage detected