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

View File

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