View Single Post
Old 07-22-2014, 04:31 AM   #4
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,467
Karma: 8025600
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
What I do is have a script (monit on linux) that watches the timestamp of the calibre database file in the sync'ed folder (dropbox for me). If the timestamp changes then monit runs a script to restart calibre.

My calibre restart script kills calibre, copies the database file to /tmp, sets the environment variable CALIBRE_OVERRIDE_DATABASE_PATH to that new copy, then starts calibre. Total calibre-off time is seconds.

This technique ensures that the database file in the sync folder is open only for as long as it takes to make a copy, reducing sync failures to almost zero. A failure can still happen, but it would require two syncs within the monitoring window of the script.

I don't know what you would use to watch timestamps on a windows system.
chaley is offline   Reply With Quote