Skip to content

Instantly share code, notes, and snippets.

@kirkland
Last active May 10, 2016 13:03
Show Gist options
  • Save kirkland/bf47bcbe648638ae30eebbc13de6fb9f to your computer and use it in GitHub Desktop.
Save kirkland/bf47bcbe648638ae30eebbc13de6fb9f to your computer and use it in GitHub Desktop.
def self.reserve(worker, max_run_time = Worker.max_run_time)
ready_scope = ready_to_run(worker.name, max_run_time)
ready_scope = ready_scope.by_priority
reserve_with_scope(ready_scope, worker, db_time_now)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment