Acquire lock
-----------------
If a workflow wants to acquire a lock, use the 'Acquire lock' action, and fill in the following parameters:
- Lock id: The name of the lock to acquire. Other workflows reading from / writing to the same piece of data in the database should use the same Lock id.
- Client id: An identifier for the user/process acquiring the lock. Only the user/workflow with the same Client id as the one used to acquire the lock will be able to release it.
- Time to live: The duration of the lock, in seconds (defaults to 10 seconds). The creator of the lock will be able to release the lock before its expiration, but if the creator doesn't release it, the lock will expire after this time.
- Website home URL: Enter the Website home URL.
Release lock
------------------
If a workflow wants to release a lock it had previously acquired, use the 'Release lock' action, and fill in the following parameters:
- Lock id: The name of the lock to release.
- Client id: The name of the user/process that had acquired the lock. Only the client that acquired it is able to release it.
- Website home URL: Enter the Website home URL.
Editor:
https://bubble.io/page?type=page&name=database_lock&id=magc-demos&test_plugin=1626966832899x409936294626197500_currentDemo:
https://magc-demos.bubbleapps.io/version-test/database_lock