resque / resque/resque-scheduler
How to configure Lock timeout
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 1.7k
- Forks
- 477
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
The base class of the Lock constructor suggests the timeout is configurable:
@timeout = options[:timeout] || 60 * 3
However, in the locking module, there is no way to put in the options with code like this. How do we easily change the configuration without changing the source code?
def build_master_lock
if supports_lua?
Resque::Scheduler::Lock::Resilient.new(master_lock_key)
else
Resque::Scheduler::Lock::Basic.new(master_lock_key)
end
end
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
Start at the build_master_lock entry point shown in the issue and read the Lock, Resilient, and Basic constructors to trace how timeout options are handled. Determine how the locking module could expose that configuration without source edits, then add coverage for the configured timeout if an existing lock test location is found. Done means users can change the timeout through the supported configuration path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100