ttlfs
Create a lock-file with a TTL.
what is it good for?
When you want to perform an operation only once in a given block of time, from a single process, on a single server, e.g., during an NRPE check.
what isn't it good for?
When you have multiple processes, in parallel, attempting to acquire a lock.
Usage
var ttlfs = ; // check the ttl on a lock.ttlfs; // there is no need to check the ttl.// an error will occur if the lock can't// be fetched.ttlfs;
Configuration
ttlfs accepts the following configuraiton settings:
- expiry: when, in ms, should the lock expire? default
60000
.
var ttlfs = ;