PagerDuty / blender

A modular orchestration engine
https://github.com/PagerDuty/blender
Other
183 stars 8 forks source link

Remove hardcoded paths in flock behavior #27

Closed esigler closed 9 years ago

esigler commented 9 years ago

Since I'm running/testing this on an OS that doesn't have /var/lock, I'd like to have all the tests actually pass. There's still a flapper somewhere in the flock code where sometimes the tests pass and sometimes they don't, but this at least cleans up the pathing & makes it more platform agnostic.

ranjib commented 9 years ago

Flock support was added to prohibit same script running on the same machine as two different processes (similar to runonce), hence an flock with tempdir might be suboptimal. we can make the path argument as a mandatory argument if we cant find a platform neutral lock path

theckman commented 9 years ago

I'm okay with /tmp/blender-(id).lock or something. Realistically, you shouldn't go in there deleting files willy-nilly. And if you do, you deserve to have things break.

esigler commented 9 years ago

Reverted my default directory change, kept where paths are hardcoded in tests & released lock cleanup.