Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Conflicts: README.markdown lib/resque.rb lib/resque/worker.rb
- Loading branch information
Showing
13 changed files
with
231 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
module Resque | ||
module Failure | ||
# A Failure backend that uses multiple backends | ||
# delegates all queries to the first backend | ||
class Multiple < Base | ||
|
||
class << self | ||
attr_accessor :classes | ||
end | ||
|
||
def self.configure | ||
yield self | ||
Resque::Failure.backend = self | ||
end | ||
|
||
def initialize(*args) | ||
@backends = self.class.classes.map {|klass| klass.new(*args)} | ||
end | ||
def save | ||
@backends.each(&:save) | ||
end | ||
|
||
# The number of failures. | ||
def self.count | ||
classes.first.count | ||
end | ||
|
||
# Returns a paginated array of failure objects. | ||
def self.all(start = 0, count = 1) | ||
classes.first.all(start,count) | ||
end | ||
|
||
# A URL where someone can go to view failures. | ||
def self.url | ||
classes.first.url | ||
end | ||
|
||
# Clear all failure objects | ||
def self.clear | ||
classes.first.clear | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module Resque | ||
Version = '1.3.1' | ||
Version = '1.4.0' | ||
end |
Oops, something went wrong.