javan / javan/whenever

Lock implementation for only running 1 instance of a process at a time

Open
#856 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.