totoro 0.5.3 → 0.5.4
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 +4 -4
- data/lib/totoro/base_queue.rb +16 -8
- data/lib/totoro/config.rb +1 -1
- data/lib/totoro/version.rb +1 -1
- data/pkg/totoro-0.5.3.gem +0 -0
- data/pkg/totoro-0.5.4.gem +0 -0
- data/test/totoro_test/Gemfile.lock +3 -3
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c2cde32d01379552d09b7e6e8daee1cb2863b143589abce656bc651495f4049
|
4
|
+
data.tar.gz: f4cee462e59f407cd999d3822ac3697e16ba55ddb551296f12055617bc583df6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69584e24ac3891412fe36c73fce095af69d180492e17572ef2f6f14ab19db5212a07cdcf5a42e11bff4d7eedf4e7558da2f011aad99b5bed5263138c4bce25c4
|
7
|
+
data.tar.gz: 24b5d356315403a5b755ea85a2b216f4d7084a9294b9a43b90ac06b9ee24c8f4afe3da34a6b5e90c417f46f8277c03934712fab1c59c234f52947e5fdf287534
|
data/lib/totoro/base_queue.rb
CHANGED
@@ -29,15 +29,9 @@ module Totoro
|
|
29
29
|
Rails.logger.info "send message to #{queue.name}"
|
30
30
|
STDOUT.flush
|
31
31
|
rescue Bunny::TCPConnectionFailedForAllHosts,
|
32
|
+
Bunny::NetworkErrorWrapper,
|
32
33
|
AMQ::Protocol::EmptyResponseError => error
|
33
|
-
|
34
|
-
Rails.logger.info 'Add failed message to resend list'
|
35
|
-
STDOUT.flush
|
36
|
-
Totoro::TotoroFailedMessage.create(
|
37
|
-
class_name: to_s,
|
38
|
-
queue_id: id,
|
39
|
-
payload: payload
|
40
|
-
)
|
34
|
+
handle_failed_msg(id, payload, error)
|
41
35
|
end
|
42
36
|
|
43
37
|
def subscribe(id)
|
@@ -50,6 +44,20 @@ module Totoro
|
|
50
44
|
def get_worker(worker_class)
|
51
45
|
::Worker.const_get(worker_class.to_s.camelize).new
|
52
46
|
end
|
47
|
+
|
48
|
+
private
|
49
|
+
|
50
|
+
def handle_failed_msg(id, payload, error)
|
51
|
+
Rails.logger.error error.message
|
52
|
+
Rails.logger.info 'Add failed message to resend list'
|
53
|
+
STDOUT.flush
|
54
|
+
@config = nil
|
55
|
+
Totoro::TotoroFailedMessage.create(
|
56
|
+
class_name: to_s,
|
57
|
+
queue_id: id,
|
58
|
+
payload: payload
|
59
|
+
)
|
60
|
+
end
|
53
61
|
end
|
54
62
|
end
|
55
63
|
end
|
data/lib/totoro/config.rb
CHANGED
data/lib/totoro/version.rb
CHANGED
Binary file
|
Binary file
|
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: /totoro
|
3
3
|
specs:
|
4
|
-
totoro (0.5.
|
4
|
+
totoro (0.5.4)
|
5
5
|
bunny (~> 2.10)
|
6
6
|
delayed_job_active_record (~> 4.1.3)
|
7
7
|
delayed_job_recurring (~> 0.3.7)
|
@@ -49,8 +49,8 @@ GEM
|
|
49
49
|
amq-protocol (2.3.0)
|
50
50
|
arel (8.0.0)
|
51
51
|
builder (3.2.3)
|
52
|
-
bunny (2.
|
53
|
-
amq-protocol (~> 2.3.0)
|
52
|
+
bunny (2.12.0)
|
53
|
+
amq-protocol (~> 2.3, >= 2.3.0)
|
54
54
|
byebug (10.0.2)
|
55
55
|
concurrent-ruby (1.0.5)
|
56
56
|
crass (1.0.4)
|
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.5.
|
4
|
+
version: 0.5.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ShuHui18
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-11-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bunny
|
@@ -131,6 +131,8 @@ files:
|
|
131
131
|
- lib/totoro/tasks/resend_message.rake
|
132
132
|
- lib/totoro/totoro_failed_message.rb
|
133
133
|
- lib/totoro/version.rb
|
134
|
+
- pkg/totoro-0.5.3.gem
|
135
|
+
- pkg/totoro-0.5.4.gem
|
134
136
|
- spec/spec_helper.rb
|
135
137
|
- spec/totoro_spec.rb
|
136
138
|
- test/totoro_test/Gemfile
|