dj_remixes 0.0.17 → 0.0.18
Sign up to get free protection for your applications and to get access to all the features.
data/lib/dj_remixes/hoptoad.rb
CHANGED
@@ -4,7 +4,7 @@ if Object.const_defined?(:HoptoadNotifier)
|
|
4
4
|
|
5
5
|
# Report Errors to Hoptoad:
|
6
6
|
def failure_with_hoptoad(job, error)
|
7
|
-
HoptoadNotifier.notify_or_ignore(error, :cgi_data => self.attributes)
|
7
|
+
HoptoadNotifier.notify_or_ignore(error, :cgi_data => self.dj_object.attributes)
|
8
8
|
failure_without_hoptoad(job, error)
|
9
9
|
end
|
10
10
|
|
@@ -5,7 +5,7 @@ class UniqueDJValidator < ActiveModel::Validator
|
|
5
5
|
if record.payload_object.respond_to?(:unique?) && record.new_record?
|
6
6
|
if record.payload_object.unique?
|
7
7
|
if DJ.where(:worker_class_name => record.payload_object.worker_class_name, :finished_at => nil).count > 0
|
8
|
-
record.errors.
|
8
|
+
record.errors.add(:base, "Only one #{record.payload_object.worker_class_name} can be queued at a time!")
|
9
9
|
end
|
10
10
|
end
|
11
11
|
end
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 18
|
9
|
+
version: 0.0.18
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- markbates
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-07-
|
17
|
+
date: 2010-07-08 00:00:00 -04:00
|
18
18
|
default_executable:
|
19
19
|
dependencies: []
|
20
20
|
|