sidekick-client 0.2.0 → 0.2.1
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/sidekick/client/sidekick_client.rb +4 -6
- data/sidekick-client.gemspec +1 -1
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.1
|
@@ -8,6 +8,7 @@ require "#{File.dirname(__FILE__)}/../shared/sidekick_queue_publisher"
|
|
8
8
|
Thread.new { EM.run } unless EM.reactor_running?
|
9
9
|
|
10
10
|
SIDEKICK_CONFIG = "/etc/vamp/sidekick.conf" unless defined?(SIDEKICK_CONFIG)
|
11
|
+
DEFAULT_LOG_LOCATION = "/var/log/cft/sidekick/sidekick_client.log"
|
11
12
|
# TODO: this client must be used from within a rails application right now
|
12
13
|
# because it relies on RAILS_ROOT to find its config file
|
13
14
|
#
|
@@ -22,11 +23,8 @@ class SidekickClient
|
|
22
23
|
@config ||= config_override.with_indifferent_access
|
23
24
|
end
|
24
25
|
|
25
|
-
|
26
|
-
|
27
|
-
else
|
28
|
-
@logger = SidekickLogger.new(STDOUT)
|
29
|
-
end
|
26
|
+
@config[:sidekick_log_file] ||= DEFAULT_LOG_LOCATION
|
27
|
+
@logger = SidekickLogger.new(@config[:sidekick_log_file].to_s.gsub("sidekick.log","sidekick_client.log"))
|
30
28
|
|
31
29
|
@config[:exchange] ||= "amq.direct"
|
32
30
|
|
@@ -56,4 +54,4 @@ class SidekickClient
|
|
56
54
|
response = @qconn.publish(message.to_yaml, queue_name || @config[:queue_name], temp_queue)
|
57
55
|
return response && YAML.load(response)
|
58
56
|
end
|
59
|
-
end
|
57
|
+
end
|
data/sidekick-client.gemspec
CHANGED