Skip to content

Commit

Permalink
Fix exit/stopping workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanielrindlaub committed Oct 24, 2024
1 parent 2f6439c commit da7f1ca
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ const config = require('./config/index');

async function shutDown(imgWatcher, metricsLogger, worker, mbase) {
try {
console.log(`Exiting Animl Base`);
if (config.platform === 'linux') {
await mbase.stop();
}
console.log(`Stopping Animl Base...`);
worker.stop();
await imgWatcher.close();
console.log('imgWatcher stopped');
metricsLogger.stop();
if (config.platform === 'linux') {
await mbase.stop();
}
process.exit(0);
} catch (err) {
console.log(`An error occured while exiting`);
console.log(`An error occurred while exiting`);
process.exit(1);
}
}
Expand All @@ -42,7 +42,7 @@ function handleNewFile(filePath, queue, metricsLogger) {

async function start() {
console.log('---------------------------------\n');
console.log('\nStarting Animl Base');
console.log('Starting Animl Base');

// Starting Buckeye software
let mbase = new Multibase(config);
Expand Down
2 changes: 1 addition & 1 deletion src/utils/multibase.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class Multibase {
if (this.config.platform === 'linux') {
const running = await this.isRunning();
if (running) {
console.log('Stopping Multibase SE');
console.log('Stopping Multibase SE...');
await this.exec('mbasectl', ['-k']);
console.log('Multibase SE stopped');
}
Expand Down

0 comments on commit da7f1ca

Please sign in to comment.