garbageman 0.3.5 → 0.3.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/VERSION +1 -1
- data/garbageman.gemspec +1 -1
- data/lib/garbageman/collector.rb +3 -0
- data/lib/garbageman/config.rb +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZTUxY2YyM2I2ODhiMjVhYTA0Y2JlZjUzNGIzMDc4NjJjNDc4MzdiOQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YjI0NmU3NmFjZjcyMDdiNTJkNWQxOWJmYjQxNjk0OWRhZjhmZDk0MQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MWJlYjQ5Yjc2OWEzMjM4YTNmZTk0ODAzNmZiZTg4YzVkN2M5OGYyZDczOGM5
|
10
|
+
OWU0YjNiMTRjMTY2NzI2N2E0ZDFjNjQ1NmEwNzk3MjNmZjEzY2I3YWZjNTk0
|
11
|
+
ODY3Y2FiNjUwNmMyYzA5OGIwMjIxM2QxZTgzN2JjZTAwN2RjNzE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NjYzOWYzMjNiZjVlZDFlOGMwMDRlYWUwYjU4ODRhZTc5YTBhMThjZjgzYTU2
|
14
|
+
ZjUzYzkxOTUwZmRkNDA2MTRiMjdiNWJhZDNmZWFjZjY3NDk1NWU4NjNlMzk4
|
15
|
+
ZDE3NWUyN2UyMWI4NDYzZDM5N2E5MDcwODA4NDk4MTRkZmFiZWE=
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.6
|
data/garbageman.gemspec
CHANGED
data/lib/garbageman/collector.rb
CHANGED
@@ -78,6 +78,8 @@ module GarbageMan
|
|
78
78
|
end
|
79
79
|
|
80
80
|
unless can_collect?
|
81
|
+
@can_collect_at ||= Time.now
|
82
|
+
return unless (Time.now - @can_collect_at) >= Config.time_to_wait_before_collecting
|
81
83
|
return unless will_collect # return unless been selected to gc
|
82
84
|
if waited_too_long_for_connections_to_drain?
|
83
85
|
warn CONNECTIONS_DID_NOT_DRAIN_IN_TIME
|
@@ -202,6 +204,7 @@ module GarbageMan
|
|
202
204
|
@will_collect = false
|
203
205
|
@will_select_next_server = false
|
204
206
|
@selected_to_collect_at = nil
|
207
|
+
@can_collect_at = nil
|
205
208
|
end
|
206
209
|
|
207
210
|
def busy?
|
data/lib/garbageman/config.rb
CHANGED
@@ -64,5 +64,11 @@ module GarbageMan
|
|
64
64
|
@@gc_sleep = 0.00
|
65
65
|
def self.gc_sleep; @@gc_sleep; end
|
66
66
|
def self.gc_sleep=(v); @@gc_sleep = v || 10; end
|
67
|
+
|
68
|
+
# after selected and connections are drained, wait this many seconds before
|
69
|
+
# collecting so that all proxies are aware that this process will collect
|
70
|
+
@@time_to_wait_before_collecting = 2.0
|
71
|
+
def self.time_to_wait_before_collecting; @@time_to_wait_before_collecting; end
|
72
|
+
def self.time_to_wait_before_collecting=(v); @@time_to_wait_before_collecting = v || 2.0; end
|
67
73
|
end
|
68
74
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: garbageman
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Doug Youch
|
@@ -101,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
101
101
|
version: '0'
|
102
102
|
requirements: []
|
103
103
|
rubyforge_project:
|
104
|
-
rubygems_version: 2.
|
104
|
+
rubygems_version: 2.6.13
|
105
105
|
signing_key:
|
106
106
|
specification_version: 4
|
107
107
|
summary: Process requests without garbage collection
|