modern_times 0.2.7 → 0.2.8
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.
- data/VERSION +1 -1
- data/lib/modern_times/jms/publisher.rb +3 -1
- data/lib/modern_times/jms/worker.rb +2 -1
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.8
|
@@ -58,13 +58,14 @@ module ModernTimes
|
|
58
58
|
@@worker_instances.each do |worker|
|
59
59
|
if worker.kind_of?(Worker) && ModernTimes::JMS.same_destination?(@producer_options, worker.class.destination_options)
|
60
60
|
ModernTimes.logger.debug "Dummy publishing #{object} to #{worker}"
|
61
|
+
worker.message = OpenStruct.new(:jms_message_id => @@message_id.to_s)
|
61
62
|
worker.perform(object)
|
62
63
|
end
|
63
64
|
end
|
64
65
|
if correlation_id = props[:jms_correlation_id]
|
65
66
|
@@dummy_cache[correlation_id] = object
|
66
67
|
end
|
67
|
-
return @@message_id
|
68
|
+
return @@message_id.to_s
|
68
69
|
end
|
69
70
|
|
70
71
|
def to_s
|
@@ -72,6 +73,7 @@ module ModernTimes
|
|
72
73
|
end
|
73
74
|
|
74
75
|
def self.setup_dummy_publishing(workers)
|
76
|
+
require 'ostruct'
|
75
77
|
@@message_id = 0
|
76
78
|
@@dummy_cache = {}
|
77
79
|
@@worker_instances = workers.map {|worker| worker.new}
|
@@ -32,7 +32,8 @@ module ModernTimes
|
|
32
32
|
module Worker
|
33
33
|
include ModernTimes::Base::Worker
|
34
34
|
|
35
|
-
attr_reader :session, :
|
35
|
+
attr_reader :session, :message_count
|
36
|
+
attr_accessor :message
|
36
37
|
|
37
38
|
module ClassMethods
|
38
39
|
def create_supervisor(manager, worker_options)
|