action_subscriber 5.2.3-java → 5.2.4-java
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/action_subscriber/babou.rb +4 -1
- data/lib/action_subscriber/version.rb +1 -1
- data/lib/action_subscriber.rb +12 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b3c149733cfa1c38c096b3e1c9b69662c707d4fc1ead5285f62c3ff95589cf63
|
4
|
+
data.tar.gz: 46ad0ff7ab7ccd891f91376d25fe203c0bedac121ec438210d51c232af8e83b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8525aae6c072fd7411b54cebef73631acdebfd910fa644d488ef8e11031532fe64748172c180874defc27e711773dc9fbf9e958ab58ca96d795ddb9d154ae92
|
7
|
+
data.tar.gz: f5cd2b516b63013eb6697caa94abe6f0394012dd9e7e8e1426ef8f70d38bdef2bfbd57abb760dfc7385cbade43cb5f49dd3c894aae5a5bb633942d9f12e4686f
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require "active_support/notifications"
|
2
|
+
|
1
3
|
module ActionSubscriber
|
2
4
|
module Babou
|
3
5
|
##
|
@@ -10,7 +12,7 @@ module ActionSubscriber
|
|
10
12
|
::ActionSubscriber.print_subscriptions
|
11
13
|
::ActionSubscriber.start_subscribers!
|
12
14
|
logger.info "Action Subscriber connected"
|
13
|
-
|
15
|
+
::ActiveSupport::Notifications.instrument("action_subscriber:server_started")
|
14
16
|
while true
|
15
17
|
sleep 1.0 #just hang around waiting for messages
|
16
18
|
break if shutting_down?
|
@@ -21,6 +23,7 @@ module ActionSubscriber
|
|
21
23
|
logger.info "Shutting down"
|
22
24
|
::ActionSubscriber::RabbitConnection.subscriber_disconnect!
|
23
25
|
logger.info "Shutdown complete"
|
26
|
+
::ActiveSupport::Notifications.instrument("action_subscriber:server_stopped")
|
24
27
|
exit(0)
|
25
28
|
end
|
26
29
|
|
data/lib/action_subscriber.rb
CHANGED
@@ -87,6 +87,18 @@ module ActionSubscriber
|
|
87
87
|
route_set.wait_to_finish_with_timeout(timeout)
|
88
88
|
end
|
89
89
|
|
90
|
+
def self.after_server_start(&block)
|
91
|
+
::ActiveSupport::Notifications.subscribe("action_subscriber:server_started") do |*args|
|
92
|
+
block.call(*args)
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
def self.after_server_stop(&block)
|
97
|
+
::ActiveSupport::Notifications.subscribe("action_subscriber:server_stopped") do |*args|
|
98
|
+
block.call(*args)
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
90
102
|
# Execution is delayed until after app loads when used with bin/action_subscriber
|
91
103
|
require "action_subscriber/railtie" if defined?(Rails)
|
92
104
|
::ActiveSupport.run_load_hooks(:action_subscriber, Base)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: action_subscriber
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.2.
|
4
|
+
version: 5.2.4
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Brian Stien
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date:
|
15
|
+
date: 2022-01-06 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
requirement: !ruby/object:Gem::Requirement
|