resque-honey 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/resque/plugins/honey/version.rb +1 -1
- data/lib/resque/plugins/honey.rb +6 -10
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d5889e0ab8e3bec12b2c04370cb23a7649b1948c
|
4
|
+
data.tar.gz: 552b87ae3823402cdeef2692303813e6eb941f5f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f8ed8d4f2d61e33d303c2ded179710bf5ec4748970dc4abf82d78ca1b1f5397d6aee1fc4c5a2d7e6bc3892660076fec64ed7cb968133caaf56d53129e2fc8ea
|
7
|
+
data.tar.gz: cb0a045003e1f145803b29b56369fd168d24e593a039dd7003c184b2b2b2c67ceb4a0ff0467676ddda93b14eecab0342e912ee3da05f9f173efabf938b6b70c3
|
data/lib/resque/plugins/honey.rb
CHANGED
@@ -1,19 +1,14 @@
|
|
1
1
|
module Resque
|
2
2
|
module Plugins
|
3
3
|
module Honey
|
4
|
-
|
5
|
-
|
6
|
-
end
|
7
|
-
|
8
|
-
def self.dataset_name=(dataset_name)
|
9
|
-
@dataset_name = dataset_name
|
10
|
-
end
|
4
|
+
mattr_accessor :write_key
|
5
|
+
mattr_accessor :dataset_name
|
11
6
|
|
12
7
|
def around_perform_honey(*args)
|
13
|
-
return yield unless
|
8
|
+
return yield unless write_key && dataset_name
|
14
9
|
|
15
|
-
client = Libhoney::Client.new(writekey:
|
16
|
-
dataset:
|
10
|
+
client = Libhoney::Client.new(writekey: write_key,
|
11
|
+
dataset: dataset_name)
|
17
12
|
exc = nil
|
18
13
|
result = nil
|
19
14
|
start_time = Time.now
|
@@ -30,6 +25,7 @@ module Resque
|
|
30
25
|
success: exc.nil?,
|
31
26
|
worker_host: `hostname`.chomp
|
32
27
|
}
|
28
|
+
p data
|
33
29
|
client.send_now(data)
|
34
30
|
|
35
31
|
client.close(true)
|