Skip to content

Commit

Permalink
fix: possible fix for infinite restarts
Browse files Browse the repository at this point in the history
  • Loading branch information
wajeht committed Oct 28, 2023
1 parent 430d63b commit 90d98f2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/commands/start.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import path from 'path';
import { fileURLToPath } from 'url';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const backupWorker = fork(path.resolve(__dirname, '../utils/backup-worker.js'));

const config = await db.select('*').from('configurations').first();

Expand All @@ -34,6 +33,7 @@ async function start() {
containers.forEach((container) => {
const cronExpression = timeToCron(container.back_up_frequency);
cron.schedule(cronExpression, () => {
const backupWorker = fork(path.resolve(__dirname, '../utils/backup-worker.js'));
backupWorker.send(container.id);
});
});
Expand Down
Binary file modified src/database/db.sqlite
Binary file not shown.

0 comments on commit 90d98f2

Please sign in to comment.