alseambusher / crontab-ui

Easy and safe way to manage your crontab file
https://lifepluslinux.blogspot.com/2015/06/crontab-ui-easy-and-safe-way-to-manage.html
MIT License
2.88k stars 478 forks source link

Fix loop DB modify in docker with autosave #214

Closed rodriciru closed 9 months ago

rodriciru commented 1 year ago

Fixes #189 In docker with autosave option ON, db is continuisly growing because of a loop. Node.js detect crontab.db is modified -> call a method wich creates some cron and other files, and updates the DB -> Db gets modified by this last update -> Node detects Db is modified......... Result is a huge db size by only one entry. This PR disable the loop by setting a boolean on certain methods, and enable the call to the method that updtes the db

rodriciru commented 1 year ago

Can look at this pr, and tell me your opinion?

alseambusher commented 1 year ago

I was thinking of adding your other suggestion https://github.com/louischatriot/nedb#persistence. I am running some tests with it

rodriciru commented 1 year ago

That is a workaround, not a solution. DB constantly grows, but after X time it will be reset. For me, my PR is a fix, so it only grows when it needs to grow, not every time. And it dosnt have so much risk to use IMO

stale[bot] commented 11 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.