mirror of
https://github.com/strapi/strapi.git
synced 2025-12-27 15:13:21 +00:00
Remove unused function along with unused cluster module
This commit is contained in:
parent
5b38c069c6
commit
cb6507195b
40
lib/start.js
40
lib/start.js
@ -4,9 +4,6 @@
|
||||
* Module dependencies
|
||||
*/
|
||||
|
||||
// Node.js core.
|
||||
const cluster = require('cluster');
|
||||
|
||||
// Public node modules.
|
||||
const async = require('async');
|
||||
|
||||
@ -31,40 +28,5 @@ module.exports = function start(configOverride, cb) {
|
||||
async.series([
|
||||
cb => self.load(configOverride, cb),
|
||||
this.initialize
|
||||
],
|
||||
|
||||
function strapiReady(err) {
|
||||
if (err) {
|
||||
return self.stop(function (errorStoppingStrapi) {
|
||||
if (errorStoppingStrapi) {
|
||||
self.log.error('When trying to stop the application as a result of a failed start');
|
||||
self.log.error(errorStoppingStrapi);
|
||||
}
|
||||
cb(err);
|
||||
});
|
||||
}
|
||||
|
||||
// Log some server info.
|
||||
if (cluster.isMaster) {
|
||||
self.log.info('Server started in ' + self.config.appPath);
|
||||
self.log.info('Your server is running at ' + self.config.url);
|
||||
self.log.debug('Time: ' + new Date());
|
||||
self.log.debug('Environment: ' + self.config.environment);
|
||||
self.log.debug('Process PID: ' + process.pid);
|
||||
self.log.debug('Cluster: master');
|
||||
self.log.info('To shut down your server, press <CTRL> + C at any time');
|
||||
} else {
|
||||
self.log.warn('New worker starting...');
|
||||
self.log.debug('Process PID: ' + process.pid);
|
||||
self.log.debug('Cluster: worker #' + cluster.worker.id);
|
||||
}
|
||||
|
||||
// Blank log to give some space.
|
||||
console.log();
|
||||
|
||||
// Emit an event when Strapi has started.
|
||||
self.emit('started');
|
||||
self.started = true;
|
||||
return cb(null, self);
|
||||
});
|
||||
]);
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user