Lock implementation for only running 1 instance of a process at a time
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 8.9k
- Forks
- 715
- PR merge metrics
- No merged PRs in 30d
Description
I have an issue where some scripts that need to be run every 10 min sometime take longer to finish. Although, I have implemented a clunky code check for locks etc to make it work, there are several edge cases (like crashes etc).
Is there a cleaner way to implement this via whenever gem? e.g. "with: lock" added to a line that can tell the cron to check for a lock file.
I will appreciate if someone has already done this by modifying this gem?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files, tests, or entry points. Start by reviewing how whenever generates cron commands, then determine the intended lock-file behavior for overlapping runs and crashes; done means a documented, reliable way to prevent more than one instance of a scheduled process.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- devops
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100