rservicebus2 0.2.10 → 0.2.15
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/rservicebus2.rb +6 -5
- data/lib/rservicebus2/appresource/awss3.rb +3 -3
- data/lib/rservicebus2/appresource/awssqs.rb +2 -0
- data/lib/rservicebus2/appresource/dir.rb +3 -0
- data/lib/rservicebus2/appresource/file.rb +2 -0
- data/lib/rservicebus2/appresource/fluiddb.rb +3 -0
- data/lib/rservicebus2/appresource/fluiddb2.rb +3 -1
- data/lib/rservicebus2/config.rb +38 -29
- data/lib/rservicebus2/endpointmapping.rb +2 -4
- data/lib/rservicebus2/handler_manager.rb +1 -1
- data/lib/rservicebus2/helper_functions.rb +13 -12
- data/lib/rservicebus2/host.rb +1 -1
- data/lib/rservicebus2/message.rb +2 -0
- data/lib/rservicebus2/message/statisticoutput.rb +2 -0
- data/lib/rservicebus2/message/subscription.rb +2 -0
- data/lib/rservicebus2/message/verboseoutput.rb +2 -0
- data/lib/rservicebus2/monitor.rb +7 -7
- data/lib/rservicebus2/monitor/awss3.rb +3 -1
- data/lib/rservicebus2/monitor/awssqs.rb +9 -7
- data/lib/rservicebus2/monitor/beanstalk.rb +53 -0
- data/lib/rservicebus2/monitor/dir.rb +24 -22
- data/lib/rservicebus2/monitor/dirnotifier.rb +4 -1
- data/lib/rservicebus2/monitor/message.rb +2 -0
- data/lib/rservicebus2/monitor/xmldir.rb +2 -0
- data/lib/rservicebus2/monitor_configure.rb +49 -36
- data/lib/rservicebus2/mq.rb +27 -30
- data/lib/rservicebus2/saga_loader.rb +27 -24
- data/lib/rservicebus2/saga_storage.rb +5 -4
- data/lib/rservicebus2/sendat_storage/file.rb +0 -1
- data/lib/rservicebus2/state_manager.rb +3 -3
- data/lib/rservicebus2/state_storage.rb +7 -6
- data/lib/rservicebus2/statistic_manager.rb +7 -3
- data/lib/rservicebus2/subscription_manager.rb +7 -5
- data/lib/rservicebus2/subscription_storage.rb +6 -5
- data/lib/rservicebus2/subscription_storage/file.rb +5 -18
- data/lib/rservicebus2/subscription_storage_configure.rb +2 -0
- data/lib/rservicebus2/transporter.rb +63 -52
- metadata +3 -3
- data/lib/rservicebus2/stats.rb +0 -68
data/lib/rservicebus2/stats.rb
DELETED
@@ -1,68 +0,0 @@
|
|
1
|
-
module RServiceBus2
|
2
|
-
# Used to collect various run time stats for runtime reporting
|
3
|
-
class Stats
|
4
|
-
def initialize
|
5
|
-
@hash = {}
|
6
|
-
|
7
|
-
@total_processed = 0
|
8
|
-
@total_errored = 0
|
9
|
-
@total_sent = 0
|
10
|
-
@total_published = 0
|
11
|
-
@total_reply = 0
|
12
|
-
|
13
|
-
@total_by_message_type = {}
|
14
|
-
|
15
|
-
@written = false
|
16
|
-
end
|
17
|
-
|
18
|
-
def inc_total_processed
|
19
|
-
@total_processed += 1
|
20
|
-
end
|
21
|
-
|
22
|
-
def inc_total_errored
|
23
|
-
@total_errored += 1
|
24
|
-
end
|
25
|
-
|
26
|
-
def inc_total_sent
|
27
|
-
@total_sent += 1
|
28
|
-
end
|
29
|
-
|
30
|
-
def inc_total_published
|
31
|
-
@total_published += 1
|
32
|
-
end
|
33
|
-
|
34
|
-
def inc_total_reply
|
35
|
-
@total_reply += 1
|
36
|
-
end
|
37
|
-
|
38
|
-
def inc(key)
|
39
|
-
@hash[key] = 0 if @hash[key].nil?
|
40
|
-
@hash[key] += 1
|
41
|
-
end
|
42
|
-
|
43
|
-
def inc_message_type(class_name)
|
44
|
-
@total_by_message_type[class_name] = 0 if @total_by_message_type[class_name].nil?
|
45
|
-
@total_by_message_type[class_name] += 1
|
46
|
-
end
|
47
|
-
end
|
48
|
-
|
49
|
-
def get_for_reporting_2
|
50
|
-
return unless @written == false
|
51
|
-
|
52
|
-
@written = true
|
53
|
-
types = Hash.new(0)
|
54
|
-
ObjectSpace.each_object do |obj|
|
55
|
-
types[obj.class] += 1
|
56
|
-
end
|
57
|
-
|
58
|
-
types
|
59
|
-
end
|
60
|
-
|
61
|
-
def get_for_reporting
|
62
|
-
"T:#{@total_processed};
|
63
|
-
E:#{@total_errored};
|
64
|
-
S:#{@total_sent};
|
65
|
-
P:#{@total_published};
|
66
|
-
R:#{@total_reply}"
|
67
|
-
end
|
68
|
-
end
|