pliny-sidekiq 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/lib/pliny/sidekiq/middleware/client/log.rb +8 -6
- data/lib/pliny/sidekiq/version.rb +1 -1
- 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: 7110a84955ce8a99dc9792d44dc55246b212474c
|
4
|
+
data.tar.gz: 5e7d757710eaf1736eeb9e8ce47c7008b32a13e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 14029ca487a567a0618e7d3996b001909176faf9f77fab32baccc9c341142bc950587290a82212c8d77330684de95fab8d42832d5cfc7454b9a39ac7d1424104
|
7
|
+
data.tar.gz: 9c5682ae8da19905395bb56f01f20543a703e9900dee9c4ecfff4bec7a870c4411d5147e76c2a10061ae2aaefdd7fcda4e2d748f3b20a79c922adbe662455c41
|
data/.gitignore
CHANGED
@@ -3,12 +3,14 @@ module Pliny::Sidekiq::Middleware
|
|
3
3
|
class Log
|
4
4
|
def call(worker_class, msg, queue, redis_pool)
|
5
5
|
yield.tap do
|
6
|
-
|
7
|
-
job:
|
8
|
-
job_id:
|
9
|
-
enqueued:
|
10
|
-
|
11
|
-
)
|
6
|
+
data = {
|
7
|
+
job: msg['class'],
|
8
|
+
job_id: msg['jid'],
|
9
|
+
enqueued: true
|
10
|
+
}
|
11
|
+
data[:enqueued_at] = Time.at(msg['enqueued_at']) if msg.has_key?('enqueued_at')
|
12
|
+
|
13
|
+
Pliny.log(data)
|
12
14
|
end
|
13
15
|
end
|
14
16
|
end
|