Use a lock across python processes or threads.
Based on sqlite/sqlalchemy implementation. Tested on python 3.4+
.
To see how it works launch process.py
multiple times.
-
if your process terminates without unlocking the lock is removed by sqlite, since the connection is garbaged.
-
to install the log package used in the example:
$ pip3 install rapydo-utils==0.5.1