scout_apm 1.6.7 → 1.6.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 51e6646411ef8e7e03434c2c4680a468fb1c5735
4
- data.tar.gz: f79cd89522151be528c1076d5fc65b2abdd62f66
3
+ metadata.gz: 60e5f3ca394fce2b63871b71be1225d9634687aa
4
+ data.tar.gz: 330e89e41635be1c597179faaca221af76ccbd2e
5
5
  SHA512:
6
- metadata.gz: b893c84366f77e64c74d8b84d7c4a20a625358d52bd6b600fefbf807fc35bf2aa8e27fc12c032bc4f4a23b76d713cb575ff0b521388c39ae5f728e94cb2d9717
7
- data.tar.gz: 420ee003c01b6f2c7b7f0c7c15001f6acd501a7d6dcbaa47ced8e4f27dff5195c6e265975fdd625aaae16811cf75de6aafb98a9660ee28639c9494f0c4ac8405
6
+ metadata.gz: 0d9aa3156586ae561fd952135e0974157ae2d33347d772db695fd1d7519109a0fc2b6ae663163930d76c5f701c8282357fd70c7694299bafa53092369ff61b6c
7
+ data.tar.gz: 189eba2d8cafd88043b09665e82a73560b3e53a418b3846b8f796d4e80f895a1e2082e8cb5e5bf43d8ec0eb8aef0e39b5c19649d6445700596e0509c88cda41c
@@ -1,3 +1,7 @@
1
+ # 1.6.8
2
+
3
+ * Don't wait on a sleeping thread during shutdown
4
+
1
5
  # 1.6.7
2
6
 
3
7
  * Mongoid bugfixes
data/LICENSE.md CHANGED
@@ -1,9 +1,27 @@
1
- All components of this product, except where noted, are Copyright (c) 2013-2016 Zimuth, Inc DBA Scout. All rights reserved.
1
+ # Scout Software Agent License
2
2
 
3
- Certain inventions disclosed in this file may be claimed within patents owned or patent applications filed by Zimuth, Inc. or third parties.
3
+ Subject to and conditioned upon your continued compliance with the terms and conditions of this license, Zimuth, Inc. grants you a non-exclusive, non-sublicensable and non-transferable, limited license to install, use and run one copy of this software on each of your and your affiliate’s computers. This license also grants you the limited right to distribute verbatim copies of this software and documentation to third parties provided the software and documentation will (a) remain the exclusive property of Zimuth; (b) be subject to the terms and conditions of this license; and (c) include a complete and unaltered copy of this license and all other copyright or other intellectual property rights notices contained in the original.
4
4
 
5
- Subject to the terms of this notice, Zimuth grants you a nonexclusive, nontransferable license, without the right to sublicense, to (a) install and execute one copy of these files on any number of workstations owned or controlled by you and (b) distribute verbatim copies of these files to third parties. As a condition to the foregoing grant, you must provide this notice along with each copy you distribute and you must not remove, alter, or obscure this notice. All other use, reproduction, modification, distribution, or other exploitation of these files is strictly prohibited, except as may be set forth in a separate written license agreement between you and Zimuth. The terms of any such license agreement will control over this notice. The license stated above will be automatically terminated and revoked if you exceed its scope or violate any of the terms of this notice.
5
+ The software includes the open-source components listed below. Any use of the open-source components by you shall be governed by, and subject to, the terms and conditions of the applicable open-source licenses.
6
6
 
7
- This License does not grant permission to use the trade names, trademarks, service marks, or product names of Zimuth, except as required for reasonable and customary use in describing the origin of this file and reproducing the content of this notice. You may not mark or brand this file with any trade name, trademarks, service marks, or product names other than the original brand (if any) provided by Zimuth.
7
+ Except as this license expressly permits, you may not:
8
+
9
+ * copy the software, in whole or in part;
10
+ * modify, correct, adapt, translate, enhance or otherwise prepare derivative works or improvements of the software;
11
+ * sell, sublicense, assign, distribute, publish, transfer or otherwise make available the software to any person or entity;
12
+ * remove, delete, efface, alter, obscure, translate, combine, supplement or otherwise change any trademarks, terms of the documentation, warranties, disclaimers, or intellectual property rights, or other symbols, notices, marks or serial numbers on or relating to any copy of the software or documentation; or
13
+ use the software in any manner or for any purpose that infringes, misappropriates or otherwise violates any intellectual property right or other right of any person or entity, or that violates any applicable law;
14
+
15
+ By using the software, you acknowledge and agree that:
16
+
17
+ * the software and documentation are licensed, not sold, to you by Zimuth and you do not and will not have or acquire under or in connection with this license any ownership interest in the software or documentation, or in any related intellectual property rights; and
18
+ * Zimuth will remain the sole and exclusive owner of all right, title and interest in and to the software and documentation, including all related intellectual property rights, subject only to the rights of third parties in open-source components and the limited license granted to you under this license; and
19
+
20
+ Except for the limited rights and licenses expressly granted to you under this agreement, nothing in this license grants, by implication, waiver, estoppel or otherwise, to you or any third party any intellectual property rights or other right, title, or interest in or to any of the software or documentation.
21
+
22
+ This license shall be automatically terminated and revoked if you exceed the scope or violate any terms and conditions of this license.
23
+
24
+ ALL LICENSED SOFTWARE, DOCUMENTATION AND OTHER PRODUCTS, INFORMATION, MATERIALS AND SERVICES PROVIDED BY ZIMUTH ARE PROVIDED HERE “AS IS.” ZIMUTH DISCLAIMS ALL WARRANTIES, WHETHER EXPRESS, IMPLIED, STATUTORY OR OTHER (INCLUDING ALL WARRANTIES ARISING FROM COURSE OF DEALING, USAGE OR TRADE PRACTICE), AND SPECIFICALLY DISCLAIMS ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. WITHOUT LIMITING THE FOREGOING, ZIMUTH MAKES NO WARRANTY OF ANY KIND THAT THE LICENSED SOFTWARE OR DOCUMENTATION, OR ANY OTHER LICENSOR OR THIRD-PARTY GOODS, SERVICES, TECHNOLOGIES OR MATERIALS, WILL MEET YOUR REQUIREMENTS, OPERATE WITHOUT INTERRUPTION, ACHIEVE ANY INTENDED RESULT, BE COMPATIBLE OR WORK WITH ANY OTHER GOODS, SERVICES, TECHNOLOGIES OR MATERIALS (INCLUDING ANY SOFTWARE, HARDWARE, SYSTEM OR NETWORK) EXCEPT IF AND TO THE EXTENT EXPRESSLY SET FORTH IN THE DOCUMENTATION, OR BE SECURE, ACCURATE, COMPLETE, FREE OF HARMFUL CODE OR ERROR FREE. ALL OPEN-SOURCE COMPONENTS AND OTHER THIRD-PARTY MATERIALS ARE PROVIDED “AS IS” AND ANY REPRESENTATION OR WARRANTY OF OR CONCERNING ANY OF THEM IS STRICTLY BETWEEN LICENSEE AND THE THIRD-PARTY OWNER OR DISTRIBUTOR OF SUCH OPEN-SOURCE COMPONENTS AND THIRD-PARTY MATERIALS.
25
+
26
+ IN NO EVENT WILL ZIMUTH BE LIABLE UNDER OR IN CONNECTION WITH THIS LICENSE OR ITS SUBJECT MATTER UNDER ANY LEGAL OR EQUITABLE THEORY, INCLUDING BREACH OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY AND OTHERWISE, FOR ANY CONSEQUENTIAL, INCIDENTAL, INDIRECT, EXEMPLARY, SPECIAL, ENHANCED OR PUNITIVE DAMAGES, IN EACH CASE REGARDLESS OF WHETHER SUCH PERSONS WERE ADVISED OF THE POSSIBILITY OF SUCH LOSSES OR DAMAGES OR SUCH LOSSES OR DAMAGES WERE OTHERWISE FORESEEABLE, AND NOTWITHSTANDING THE FAILURE OF ANY AGREED OR OTHER REMEDY OF ITS ESSENTIAL PURPOSE.
8
27
 
9
- Unless otherwise expressly agreed by Zimuth in a separate written license agreement, these files are provided AS IS, WITHOUT WARRANTY OF ANY KIND, including without any implied warranties of MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, or NON-INFRINGEMENT. As a condition to your use of these files, you are solely responsible for such use. Zimuth will have no liability to you for direct, indirect, consequential, incidental, special, or punitive damages or for lost profits or data.
@@ -183,14 +183,19 @@ module ScoutApm
183
183
  def shutdown
184
184
  logger.info "Shutting down ScoutApm"
185
185
  return if !started?
186
+
186
187
  if @background_worker
188
+ logger.info("Stopping background worker")
187
189
  @background_worker.stop
188
190
  store.write_to_layaway(layaway, :force)
189
191
  end
190
192
 
191
193
  # Make sure we don't exit the process while the background worker is running its task.
192
194
  logger.debug "Joining background worker thread"
193
- @background_worker_thread.join if @background_worker_thread
195
+ if @background_worker_thread
196
+ @background_worker_thread.wakeup
197
+ @background_worker_thread.join
198
+ end
194
199
  end
195
200
 
196
201
  def started?
@@ -12,6 +12,7 @@ module ScoutApm
12
12
  end
13
13
 
14
14
  def stop
15
+ ScoutApm::Agent.instance.logger.debug "Background Worker: stop requested"
15
16
  @keep_running = false
16
17
  end
17
18
 
@@ -25,31 +26,33 @@ module ScoutApm
25
26
  @task = block
26
27
 
27
28
  begin
28
- ScoutApm::Agent.instance.logger.debug "Starting Background Worker, running every #{period} seconds"
29
+ ScoutApm::Agent.instance.logger.debug "Background Worker: Starting Background Worker, running every #{period} seconds"
29
30
 
30
31
  # The first run should be 1 period of time from now
31
32
  next_time = Time.now + period
32
33
 
33
34
  loop do
35
+ # Bail out if @keep_running is false
36
+ unless @keep_running
37
+ ScoutApm::Agent.instance.logger.debug "Background Worker: breaking from loop"
38
+ break
39
+ end
40
+
34
41
  now = Time.now
35
42
 
36
43
  # Sleep the correct amount of time to reach next_time
37
- while now < next_time
44
+ while now < next_time && @keep_running
38
45
  sleep_time = next_time - now
39
46
  sleep(sleep_time) if sleep_time > 0
40
47
  now = Time.now
41
48
  end
42
49
 
43
- # Bail out if @keep_running is false
44
- break unless @keep_running
45
-
46
50
  @task.call
47
51
 
48
52
  # Adjust the next time to run forward by @periods until it is in the future
49
53
  while next_time <= now
50
54
  next_time += period
51
55
  end
52
-
53
56
  end
54
57
  rescue
55
58
  ScoutApm::Agent.instance.logger.debug "Background Worker Exception!"
@@ -1,4 +1,4 @@
1
1
  module ScoutApm
2
- VERSION = "1.6.7"
2
+ VERSION = "1.6.8"
3
3
  end
4
4
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scout_apm
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.7
4
+ version: 1.6.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Derek Haynes
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-07-27 00:00:00.000000000 Z
12
+ date: 2016-08-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: minitest