totoro 0.2.9 → 0.4.0

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
  SHA256:
3
- metadata.gz: cf11258108b6aff96fa74240195a9c3f5516dea8e45be87277c950cae02e805c
4
- data.tar.gz: 740e313d22f1ba8b55c289cff0c50562cf9bee2ce4fe5756d598b42765e0c201
3
+ metadata.gz: b44d3b8f2d6e6fd25e5cf6185d9654150fa531d9bdc2b8c6236f3f54ddc4a751
4
+ data.tar.gz: 0b416fe489a0bca768b0d7d6ed5a373563817d9efc2f07ed6d9f60da454bf21b
5
5
  SHA512:
6
- metadata.gz: 8b7e5ad0d806b56340509227bcad2c90073e9c4027bcc030a8e22161cbc110f3ca00ab84c29e147c0f88488b40e0ae34e99af349c118b187dd7e6b497193198b
7
- data.tar.gz: 7414028106671c3c1723f59e525c4d68be99188bd9b2fc8f1433be6fe2c964255ee38128b71ea5a09241d908a1542cf2e0a0ea899b3f0d7ee5037fbd4e30a45e
6
+ metadata.gz: 23c9106df1b78977ee14da0e93b877d7365adde40729d032f95f105dd0c2e4fa76759697d3d12817e5dd4ee2d04f7062f94a8031d2627dc137be5439dc29c105
7
+ data.tar.gz: 0d09a54b0a625277f9bb6c7ec6e2858873a0df0d0060529619fee5e12e57310aa0b51422fb0d6166b3bebf03f31dbf1b6be0c8677516170bd6c902ace6a9ee10
data/Gemfile.lock CHANGED
@@ -1,14 +1,14 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- totoro (0.2.6)
4
+ totoro (0.3.0)
5
5
  bunny (~> 2.10)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
10
  amq-protocol (2.3.0)
11
- bunny (2.11.0)
11
+ bunny (2.10.0)
12
12
  amq-protocol (~> 2.3.0)
13
13
  diff-lcs (1.3)
14
14
  rake (10.5.0)
data/docker-compose.yml CHANGED
@@ -27,7 +27,7 @@ services:
27
27
  volumes:
28
28
  - ./test/totoro_test:/app
29
29
  - .:/totoro
30
- command: ./bin/rails c
30
+ command: totoro example_queue
31
31
  environment:
32
32
  POSTGRES_USER: root
33
33
  POSTGRES_PASSWORD: root
@@ -27,6 +27,10 @@ module Totoro
27
27
  Rails.logger.info 'Listening to the Rabbitmq'
28
28
  STDOUT.flush
29
29
  @queue_class.channel.work_pool.join
30
+ rescue SignalException
31
+ puts 'Terminating process ..'
32
+ @queue_class.channel.work_pool.shutdown(true)
33
+ puts 'Stopped.'
30
34
  end
31
35
 
32
36
  def process; end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Totoro
4
- VERSION = '0.2.9'
4
+ VERSION = '0.4.0'
5
5
  end
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: /totoro
3
3
  specs:
4
- totoro (0.2.3)
4
+ totoro (0.2.9)
5
5
  bunny (~> 2.10)
6
6
 
7
7
  GEM
@@ -56,7 +56,7 @@ GEM
56
56
  ffi (1.9.25)
57
57
  globalid (0.4.1)
58
58
  activesupport (>= 4.2.0)
59
- i18n (1.0.1)
59
+ i18n (1.1.0)
60
60
  concurrent-ruby (~> 1.0)
61
61
  listen (3.1.5)
62
62
  rb-fsevent (~> 0.9, >= 0.9.4)
@@ -72,11 +72,11 @@ GEM
72
72
  mini_portile2 (2.3.0)
73
73
  minitest (5.11.3)
74
74
  nio4r (2.3.1)
75
- nokogiri (1.8.2)
75
+ nokogiri (1.8.4)
76
76
  mini_portile2 (~> 2.3.0)
77
- puma (3.11.4)
77
+ puma (3.12.0)
78
78
  rack (2.0.5)
79
- rack-test (1.0.0)
79
+ rack-test (1.1.0)
80
80
  rack (>= 1.0, < 3)
81
81
  rails (5.1.6)
82
82
  actioncable (= 5.1.6)
@@ -111,7 +111,7 @@ GEM
111
111
  spring-watcher-listen (2.0.1)
112
112
  listen (>= 2.7, < 4.0)
113
113
  spring (>= 1.2, < 3.0)
114
- sprockets (3.7.1)
114
+ sprockets (3.7.2)
115
115
  concurrent-ruby (~> 1.0)
116
116
  rack (> 1, < 3)
117
117
  sprockets-rails (3.2.1)
@@ -4,7 +4,10 @@ module Worker
4
4
  class ExampleQueue < Totoro::BaseWorker
5
5
  setup queue_name: 'example_queue'
6
6
  def process(payload, metadata, delivery_info)
7
- # worker process
7
+ (1..10).each do |i|
8
+ p i
9
+ sleep 1
10
+ end
8
11
  end
9
12
  end
10
13
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: totoro
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.9
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ShuHui18
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-26 00:00:00.000000000 Z
11
+ date: 2018-10-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bunny
@@ -98,6 +98,15 @@ files:
98
98
  - lib/totoro/config.rb
99
99
  - lib/totoro/initializer.rb
100
100
  - lib/totoro/version.rb
101
+ - pkg/totoro-0.1.1.gem
102
+ - pkg/totoro-0.1.2.gem
103
+ - pkg/totoro-0.1.3.gem
104
+ - pkg/totoro-0.1.4.gem
105
+ - pkg/totoro-0.1.5.gem
106
+ - pkg/totoro-0.1.6.gem
107
+ - pkg/totoro-0.2.0.gem
108
+ - pkg/totoro-0.2.1.gem
109
+ - pkg/totoro-0.2.7.gem
101
110
  - spec/spec_helper.rb
102
111
  - spec/totoro_spec.rb
103
112
  - test/totoro_test/Gemfile
@@ -143,8 +152,6 @@ files:
143
152
  - test/totoro_test/config/spring.rb
144
153
  - test/totoro_test/config/totoro.yml
145
154
  - test/totoro_test/db/seeds.rb
146
- - test/totoro_test/log/development.log
147
- - test/totoro_test/log/production.log
148
155
  - test/totoro_test/public/robots.txt
149
156
  - test/totoro_test/test/test_helper.rb
150
157
  - totoro.gemspec
@@ -168,7 +175,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
168
175
  version: '0'
169
176
  requirements: []
170
177
  rubyforge_project:
171
- rubygems_version: 2.7.6
178
+ rubygems_version: 2.7.3
172
179
  signing_key:
173
180
  specification_version: 4
174
181
  summary: tool for rabbitmq
@@ -1,2 +0,0 @@
1
- huishu
2
- Listening to the Rabbitmq
@@ -1,2 +0,0 @@
1
- E, [2018-07-23T04:24:19.172785 #25] ERROR -- : huishu
2
- I, [2018-07-23T08:17:35.987092 #20] INFO -- : Listening to the Rabbitmq