dbmodel tool initial import

This commit is contained in:
Jan Prochazka
2023-01-28 18:48:52 +01:00
parent cf00af9e30
commit 258338cd2e
10 changed files with 330 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
const { createLogger } = require('pinomin');
const logger = createLogger('runAndExit');
async function runAndExit(promise) {
try {
await promise;
logger.info('Success');
process.exit();
} catch (err) {
logger.error({ err }, 'Processing failed');
process.exit(1);
}
}
module.exports = runAndExit;