Hi Owen,

On 14.12.19 19:02, Owen Mays wrote:

1) Why go to the trouble of adding hostname to PID in the lock file, why not just check for existence of the lock file and treat that as evidence that the database is open? It looks like many lines of code have been written in database.c dedicated to finding an excuse to ignore the lock file :-) (by checking for a running process, etc).

Since the backend database is not designed to be shared among machines via the network, darktable is a single-machine application by design. The point of the lock file is to keep multiple processes on the same machine from opening the database at the same time. If the lockfile exists on invocation, there are two possible cases:

- An instance of darktable is already running, so it's better to open the files passed to the second instance (if any) in the first one and quit the second instance. I use this all the time to open RAW files from the command line in the running darktable instance.

- A previous instance of darktable crashed and didn't remove the lockfile. Since SQLite does a basic sanity check on the database before opening it, it's much better usability to handle this case automatically and just overwrite the lock file. Otherwise users would complain about this easy-to-fix nuisance.


2) Since sharing the library is not recommended, is there a recommended way to have one computer be aware of edits made on/by another computer? The problem I'm trying to solve is: my photos live on my laptop and are usually imported and edited there. For large jobs, I would like to be able to do processing on my desktop, which has a GPU. My current solution is to mount my laptop harddrive on the desktop via sshfs and point both darktable instances to a library file in the shared folder.

I have the same requirement, my pictures live on a central file server. I keep local darktable databases on all machines and activate the "look for updated xmp files on startup" option in the "core options" in the darktable settings.

cheers,
Simon
___________________________________________________________________________
darktable developer mailing list
to unsubscribe send a mail to darktable-dev+unsubscr...@lists.darktable.org

Reply via email to