The README suggests using flock for locking, however there's an issue with using this method:
- If you want a exclusive lock, flock will wait for the lock to be available and then run
- If you want to avoid this behaviour, you'll have to use the
-n non blocking mechanism. Unfortunately, this will always return exit code 1. This isn't optimal.
With this in mind, I think it's best to build in locking to sensu-wrapper
The README suggests using flock for locking, however there's an issue with using this method:
-nnon blocking mechanism. Unfortunately, this will always return exit code 1. This isn't optimal.With this in mind, I think it's best to build in locking to sensu-wrapper