...
- Where to store locks
- Locks are stored directly in the
live
folder or any sub-folders.
- Locks are stored directly in the
- How to reference locks in jobs
- Locks are identified by their path that is made up of the folder where the lock is stored and of the name of the lock.
- Locks that are located in the same folder as the job can address the lock by using its name (omitting the folder).
- Example
- Lock Location
- Folder
live/project_a
contains a set of jobs and a lockmy_lock_a
- Folder
live/project_b
contains a set of jobs and a lockmy_lock_b
- Folder
- Lock Usage
- Job
job_a
from folderproject_a
can reference the lock from its folder by using e.g.<lock.use name="my_lock_a" exclusive="true"/>
- Job
job_b
from folderproject_b
can be configured accordingly to use its local lock. - Should the jobs
job_a
andjob_b
be prevented to run in parallel then they have to use a common lock. This is achieved by referencing the same lock, e.g. jobjob_b
would use a reference tomy_lock_a
from the folderproject_a
like this:<lock.use name="/project_a/my_lock_a" exlcusive="yes"/>
- Caveat: It is possible to use the same lock name in different folders. This represents different locks. Jobs using relative addressing of locks by using the locklocks' s name and omitting the folder name would reference the lock in their local folder. Consider to use absolute adressing of locks if you want jobs from different folders to make use of the same lock.
- Hint: Locks that is located directly in the
live
folder can be addressed with a leading slash like this<lock.use name="/my_global_lock" exclusive="yes"/>
- Job
- Lock Location
...