rservicebus 0.1.52 → 0.1.53

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/bin/rsb_ctl +38 -0
  2. data/lib/rservicebus/Host.rb +2 -0
  3. metadata +12 -11
data/bin/rsb_ctl ADDED
@@ -0,0 +1,38 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # The application 'rservicebus' is installed as part of a gem, and
4
+ # this file is here to facilitate running it.
5
+ #
6
+
7
+ require 'rubygems'
8
+ require "rservicebus"
9
+ require "rservicebus/Agent"
10
+
11
+
12
+
13
+ if ARGV.length == 3 then
14
+ queue_name = ARGV[0]
15
+ switch_name = ARGV[1].upcase
16
+ switch_state = ARGV[2].upcase == "TRUE" || ARGV[2].upcase == "ON"
17
+ else
18
+ puts "Usage: rsb_ctl <queue name> <switch> <switch state>"
19
+ puts "Valid switchs: Stats, Verbose"
20
+ puts "Valid switch states: On, Off"
21
+ abort()
22
+ end
23
+
24
+
25
+ agent = RServiceBus::Agent.new.getAgent( URI.parse( "beanstalk://localhost" ) )
26
+ obj = nil
27
+ case switch_name
28
+ when switch_name = "STATS"
29
+ obj = switch_state == true ? RServiceBus::Message_StatisticOutputOn.new : RServiceBus::Message_StatisticOutputOff.new
30
+ when switch_name = "VERBOSE"
31
+ obj = switch_state == true ? RServiceBus::Message_VerboseOutputOn.new : RServiceBus::Message_VerboseOutputOff.new
32
+ else
33
+ puts "Switch name, #{ARGV[0]}, not recognized"
34
+ puts "Valid switchs: Stats, Verbose"
35
+ abort()
36
+ end
37
+
38
+ agent.sendMsg(obj, queue_name, "#{queue_name}Response")
@@ -221,8 +221,10 @@ module RServiceBus
221
221
  @subscriptionManager.add( @msg.msg.eventName, @msg.returnAddress )
222
222
  elsif @msg.msg.class.name == "RServiceBus::Message_StatisticOutputOn" then
223
223
  @stats.output = true
224
+ log "Turn on Stats logging"
224
225
  elsif @msg.msg.class.name == "RServiceBus::Message_StatisticOutputOff" then
225
226
  @stats.output = false
227
+ log "Turn off Stats logging"
226
228
  elsif @msg.msg.class.name == "RServiceBus::Message_VerboseOutputOn" then
227
229
  ENV["VERBOSE"] = "true"
228
230
  log "Turn on Verbose logging"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rservicebus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.52
4
+ version: 0.1.53
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2013-10-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: uuidtools
16
- requirement: &70143409829480 !ruby/object:Gem::Requirement
16
+ requirement: &70144747640380 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70143409829480
24
+ version_requirements: *70144747640380
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: json
27
- requirement: &70143409820780 !ruby/object:Gem::Requirement
27
+ requirement: &70144747639540 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70143409820780
35
+ version_requirements: *70144747639540
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: beanstalk-client
38
- requirement: &70143409819540 !ruby/object:Gem::Requirement
38
+ requirement: &70144747623640 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70143409819540
46
+ version_requirements: *70144747623640
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: fluiddb
49
- requirement: &70143409818280 !ruby/object:Gem::Requirement
49
+ requirement: &70144747538380 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *70143409818280
57
+ version_requirements: *70144747538380
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: parse-cron
60
- requirement: &70143409815500 !ruby/object:Gem::Requirement
60
+ requirement: &70144747536920 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,7 +65,7 @@ dependencies:
65
65
  version: '0'
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *70143409815500
68
+ version_requirements: *70144747536920
69
69
  description: A Ruby interpretation of NServiceBus
70
70
  email: guy@guyirvine.com
71
71
  executables:
@@ -138,6 +138,7 @@ files:
138
138
  - lib/rservicebus.rb
139
139
  - bin/ReturnErroredMessagesToSourceQueue
140
140
  - bin/ReturnMessagesToSourceQueue
141
+ - bin/rsb_ctl
141
142
  - bin/rservicebus
142
143
  - bin/rservicebus-init
143
144
  - bin/rservicebus-transport