Create a .lock file when a process is using the database. Delete the .lock when the process is done.
Create a .lock file when a process is using the database.
Delete the .lock when the process is done.