sidekiq_tracker 0.0.2 → 0.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9c68a0624613569c4c0bdab1e202d3aee1fc1670
4
- data.tar.gz: e2b98312e979adaf55fe2a703034515f18c73c6e
3
+ metadata.gz: 184fa778d3f14affde9735cc9957014330513021
4
+ data.tar.gz: 0c09371f7e5cf2881ded1adf586e357f8002967b
5
5
  SHA512:
6
- metadata.gz: 43c4ba31ac2e2cd87b9d09285dddc6fef6846136630c0b5673d143c03c41e50f4f0d7ce15087dfd0a32c983ec795c378aa01ab00e026fcf3856013b487c8c985
7
- data.tar.gz: f59dd5648f18006799a2337fb62d07875b89202cf6f2a40d90e13b3a9347f3c63627faae702e5d8c94a62a4e9604146358711c131c3b8bc170b639f6bda63350
6
+ metadata.gz: e64c0e4ab14f6a11ebf7eb309f9b2e6794b7472706e095c4c77c9489b5852b280cb5906a2f042177752cf68de39b8c2682579e230dd28b6e6bf01a87acb9b47e
7
+ data.tar.gz: de155e498db2aa13dc1cc1c3a7c207746403002fc95314113564e51f2c6d23cd7a54b50a1ae3a48087a3f033e7b2990861911a1db9b45352ba6152d41154bfe8
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2013 David Milo
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the "Software"), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ the Software, and to permit persons to whom the Software is furnished to do so,
10
+ subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,4 @@
1
+ sidekiq_tracker
2
+ ===============
3
+
4
+ Plugin for Sidekiq for monitoring of your workers.
@@ -0,0 +1,25 @@
1
+ directory = File.dirname(File.absolute_path(__FILE__))
2
+ Dir.glob("#{directory}/tracker/**/*.rb") do |file|
3
+ require file
4
+ end
5
+
6
+ module Sidekiq
7
+ module Tracker
8
+ test = "test"
9
+ end
10
+ end
11
+
12
+ Sidekiq.configure_client do |config|
13
+ config.client_middleware do |chain|
14
+ chain.add Sidekiq::Tracker::Client::Middleware
15
+ end
16
+ end
17
+
18
+ Sidekiq.configure_server do |config|
19
+ config.client_middleware do |chain|
20
+ chain.add Sidekiq::Tracker::Client::Middleware
21
+ end
22
+ config.server_middleware do |chain|
23
+ chain.add Sidekiq::Tracker::Server::Middleware
24
+ end
25
+ end
@@ -0,0 +1,15 @@
1
+ module Sidekiq
2
+ module Tracker
3
+ module Client
4
+ class Middleware
5
+ def initialize(options=nil)
6
+
7
+ end
8
+ def call(worker, msg, queue)
9
+ puts "message from client middleware"
10
+ yield
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,15 @@
1
+ module Sidekiq
2
+ module Tracker
3
+ class Job
4
+ def initialize(options={})
5
+
6
+ end
7
+
8
+ def queue(worker, msg, queue)
9
+ puts worker.class
10
+ puts msg.class
11
+ puts queue.class
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,16 @@
1
+ module Sidekiq
2
+ module Tracker
3
+ module Server
4
+ class Middleware
5
+ @job
6
+ def initialize(options=nil)
7
+ @job = Tracker::Job.new
8
+ end
9
+ def call(worker, msg, queue)
10
+ @job.queue(worker, msg, queue)
11
+ yield
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
@@ -1,23 +1,2 @@
1
- require 'sidekiq_tracker/client/middleware'
2
- require 'sidekiq_tracker/server/middleware'
3
-
4
- module Sidekiq
5
- module Tracker
6
-
7
- end
8
- end
9
-
10
- Sidekiq.configure_client do |config|
11
- config.client_middleware do |chain|
12
- chain.add Sidekiq::Tracker::Client::Middleware
13
- end
14
- end
15
-
16
- Sidekiq.configure_server do |config|
17
- config.client_middleware do |chain|
18
- chain.add Sidekiq::Tracker::Client::Middleware
19
- end
20
- config.server_middleware do |chain|
21
- chain.add Sidekiq::Tracker::Server::Middleware
22
- end
23
- end
1
+ require 'sidekiq'
2
+ require 'sidekiq/tracker'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq_tracker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Milo
@@ -16,7 +16,13 @@ executables: []
16
16
  extensions: []
17
17
  extra_rdoc_files: []
18
18
  files:
19
+ - lib/sidekiq/tracker/client/middleware.rb
20
+ - lib/sidekiq/tracker/job.rb
21
+ - lib/sidekiq/tracker/server/middleware.rb
22
+ - lib/sidekiq/tracker.rb
19
23
  - lib/sidekiq_tracker.rb
24
+ - LICENSE
25
+ - README.md
20
26
  homepage: http://rubygems.org/gems/sidekiq_tracker
21
27
  licenses:
22
28
  - MIT