View Single Post
Old 02-20-2017, 03:22 PM   #160
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,826
Karma: 30277270
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by kovidgoyal View Post
The safest way to pass data between the calls is to use the filesystem. Create a temporary file, use the file locking in calibre.utils.lock.ExclusiveFile to write to the file from the run() method and read from it in the postadd() method.
Quote:
Originally Posted by Terisa de morgan View Post
Thank you very much, I was trying to avoid for time response, but it's really the safest way: semaphores.
Assuming the plugin is using the file system to store transient data, as was suggested by Kovid Goyal then:

Users who add books in large batches could try using the CALIBRE_TEMP_DIR Environment variable to a give calibre a 'dedicated' directory for temporary storage, on an SSD if possible, exclude the directory from AV scans, indexing, compression, encryption etc etc.

BR
BetterRed is offline   Reply With Quote