appsignal 0.8.0.beta.0 → 0.8.0.beta.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/appsignal/agent.rb +10 -0
- data/lib/appsignal/config.rb +4 -0
- data/lib/appsignal/version.rb +1 -1
- data/spec/lib/appsignal/agent_spec.rb +12 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
OGEzMmIyMTk2ZjM0NmMyM2U0ODNiY2E1MzFiMGZhMmI4YTQxYzZjMA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MGU2YWVkMGEyMzRkYjkwZDdlNjEzN2EzZGZjODQyNDA4ODY5YmE2MA==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZTg3YzgyMDMwNDQ4NWRjMDcwYWJmNjdjNGExZGQ5ZjdjNzc5YTk0ZGNkMjcy
|
10
|
+
NDRkYjUzOTQxYjhmMzgxODA3N2ExMDZlZWI3MTk1ZTI4NWVkY2RhNGUyODNh
|
11
|
+
NjZlZWQ1ZWJmNmJlNmVkYmEzMWM0ZWY2N2ViYmEyN2M3ZDlmMzQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
N2FlMDNmM2Y2ZWI4NzE5NmEyOGRjZjc3MzQ1MjI4MDU2MGU2ZGZmN2MzM2Yx
|
14
|
+
NjczNjFmM2RmMDg5NzQ3ZGU2MjIzOTVjNDBhZWY3ZjMwNzExMjY1YjVjYzhj
|
15
|
+
ZTg2YjYxNDQzMGRkOTY4NzQ5NDY2OTYxNWJjODk4ZmE3MmQ0MmY=
|
data/lib/appsignal/agent.rb
CHANGED
@@ -78,6 +78,15 @@ module Appsignal
|
|
78
78
|
end
|
79
79
|
end
|
80
80
|
|
81
|
+
def clear_queue
|
82
|
+
Appsignal.logger.debug('Clearing queue')
|
83
|
+
# Replace aggregator while making sure no thread
|
84
|
+
# is adding to it's queue
|
85
|
+
Thread.exclusive do
|
86
|
+
@aggregator = Aggregator.new
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
81
90
|
def forked!
|
82
91
|
Appsignal.logger.debug('Forked worker process')
|
83
92
|
@forked = true
|
@@ -124,6 +133,7 @@ module Appsignal
|
|
124
133
|
shutdown
|
125
134
|
else
|
126
135
|
Appsignal.logger.error "Unknown Appsignal response code: '#{code}'"
|
136
|
+
clear_queue
|
127
137
|
end
|
128
138
|
end
|
129
139
|
end
|
data/lib/appsignal/config.rb
CHANGED
@@ -29,6 +29,10 @@ module Appsignal
|
|
29
29
|
load_default_config_with_push_api_key(
|
30
30
|
ENV['APPSIGNAL_API_KEY']
|
31
31
|
)
|
32
|
+
@logger.info(
|
33
|
+
'The APPSIGNAL_API_KEY environment variable has been deprecated, ' \
|
34
|
+
'please switch to APPSIGNAL_PUSH_API_KEY'
|
35
|
+
)
|
32
36
|
else
|
33
37
|
carefully_log_error(
|
34
38
|
"Not loading: No config file found at '#{config_file}' " \
|
data/lib/appsignal/version.rb
CHANGED
@@ -182,6 +182,14 @@ describe Appsignal::Agent do
|
|
182
182
|
after { subject.send_queue }
|
183
183
|
end
|
184
184
|
|
185
|
+
describe "#clear_queue" do
|
186
|
+
it "starts a new aggregator" do
|
187
|
+
Appsignal::Aggregator.should_receive(:new).twice # once on start, once on clear
|
188
|
+
end
|
189
|
+
|
190
|
+
after { subject.clear_queue }
|
191
|
+
end
|
192
|
+
|
185
193
|
describe "#forked!" do
|
186
194
|
its(:forked?) { should be_false }
|
187
195
|
|
@@ -309,6 +317,10 @@ describe Appsignal::Agent do
|
|
309
317
|
it "logs the event" do
|
310
318
|
Appsignal.logger.should_receive(:error)
|
311
319
|
end
|
320
|
+
|
321
|
+
it "clears the queue" do
|
322
|
+
subject.should_receive(:clear_queue)
|
323
|
+
end
|
312
324
|
end
|
313
325
|
|
314
326
|
after { subject.send(:handle_result, code) }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: appsignal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.0.beta.
|
4
|
+
version: 0.8.0.beta.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Beekman
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date:
|
15
|
+
date: 2014-01-03 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: activesupport
|