Closed suvayu closed 4 years ago
well, it can -- first get file list to a temporary file and then start processing it...
the version in 'dogfood' branch now uses temporary file -- it shortens the run time of notmuch search considerably!
https://raw.githubusercontent.com/domo141/nottoomuch/dogfood/nottoomuch-addresses.sh
Thank you. I'll check it out.
Now, version 2.5 of nottoomuch-addresses.sh (well, 2.4 already) uses that temporary file so database is locked for shorter period of time.
Ultimately, the locking of db could be made shorter by dumping all output to a file, and after notmuch search has exited, start filtering ignores out.
Since --update / --rebuild is supposed to be done manually (and not too often), and, if there is chance for (unrecoverable) database failure anyway, to improve things further, change to notmuch (i.e. retry in case of such a known potential failurre) should be done instead (if not already done!)
closing as, IMO, solution good enough.
Not sure if this can really be done any better. I was doing a rebuild of the database, when a cron job ran offlineimap and notmuch new. This made the database rebuild fail prematurely like this: