Project renamed

This commit is contained in:
Juan Ferrer 2022-10-24 08:01:43 +02:00
parent f5b84e338f
commit 916e92c940
2 changed files with 6 additions and 6 deletions

View File

@ -2,7 +2,7 @@
const fs = require('fs');
const path = require('path');
const defaultConfig = require('./config.json');
const DbAsync = require('./db-async');
const MyCDC = require('./mycdc');
const config = Object.assign({}, defaultConfig);
const localPath = path.join(__dirname, 'config.local.json');
@ -11,16 +11,16 @@ if (fs.existsSync(localPath)) {
Object.assign(config, localConfig);
}
let dbAsync;
let mycdc;
async function main() {
dbAsync = new DbAsync(config)
await dbAsync.start();
mycdc = new MyCDC(config)
await mycdc.start();
process.on('SIGINT', async function() {
console.log('Got SIGINT.');
try {
await dbAsync.stop();
await mycdc.stop();
} catch (err) {
console.error(err);
}

View File

@ -9,7 +9,7 @@ const allEvents = new Set([
'deleterows'
]);
module.exports = class DbAsync {
module.exports = class MyCDC {
constructor(config) {
this.config = config;
this.running = false;