This commit is contained in:
syuilo 2019-03-08 04:55:55 +09:00
parent 5f4a52574f
commit 69df556ff5
No known key found for this signature in database
GPG key ID: BDC4C49D06AB9D69

View file

@ -117,9 +117,6 @@ async function masterMain() {
await spawnWorkers(config.clusterLimit); await spawnWorkers(config.clusterLimit);
} }
// start queue
require('./queue').default();
bootLogger.succ(`Now listening on port ${config.port} on ${config.url}`, null, true); bootLogger.succ(`Now listening on port ${config.port} on ${config.url}`, null, true);
} }
@ -130,6 +127,9 @@ async function workerMain() {
// start server // start server
await require('./server').default(); await require('./server').default();
// start job queue
require('./queue').default();
if (cluster.isWorker) { if (cluster.isWorker) {
// Send a 'ready' message to parent process // Send a 'ready' message to parent process
process.send('ready'); process.send('ready');
@ -150,13 +150,9 @@ async function queueMain() {
bootLogger.succ('Misskey initialized'); bootLogger.succ('Misskey initialized');
// start processor // start processor
const queue = require('./queue').default(); require('./queue').default();
if (queue) { bootLogger.succ('Queue started', null, true);
bootLogger.succ('Queue started', null, true);
} else {
bootLogger.error('Queue not available');
}
} }
const runningNodejsVersion = process.version.slice(1).split('.').map(x => parseInt(x, 10)); const runningNodejsVersion = process.version.slice(1).split('.').map(x => parseInt(x, 10));