Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lock Improvements #131

Merged
merged 3 commits into from
Aug 15, 2014
Merged

Lock Improvements #131

merged 3 commits into from
Aug 15, 2014

Conversation

ecin
Copy link
Contributor

@ecin ecin commented Aug 14, 2014

Here's a better attempt at a refactor that allows for a high availability scheduling setup.

  • distinguish between a @scheduler_lock, which determines if a scheduler should come up, vs. a @job_lock, which determines if a triggered job should run
  • allow both :scheduler_lock and :job_lock options so that no subclassing is needed to determine how your scheduler figures out its locking situation
  • :lockfile option is still supported

Tests are provided for both locking scenarios.

This PR extends on #129, 'cause apparently Github doesn't update closed pull requests.

ecin added 3 commits August 14, 2014 16:28
Having the lock be an argument makes it easier to implement different
types of locks, since we won't need to subclass from Scheduler and
instead can implement smaller classes.
This allows for multiple scheduling processes to run concurrently, but
only one of them will run jobs at any given time.
@jmettraux
Copy link
Owner

I like it. I'll look at it in detail when I get back from work.

@ecin
Copy link
Contributor Author

ecin commented Aug 15, 2014

@jmettraux ping. Anything I need to do to get this in?

@jmettraux
Copy link
Owner

@ecin please be patient. I'm giving it two hours of my saturday morning.

jmettraux added a commit that referenced this pull request Aug 15, 2014
@jmettraux jmettraux merged commit 4b5e9d4 into jmettraux:master Aug 15, 2014
@jmettraux
Copy link
Owner

Many thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants