rails_runner 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rails_runner/config.rb +4 -0
- data/lib/rails_runner/version.rb +1 -1
- data/lib/rails_runner/worker.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 76dbf8208f0b0f8dd118ebe01a61309feadf90aa
|
4
|
+
data.tar.gz: 9e3099762d90fb462f236fd36bccc3791556720c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 09b4ed1935d173a098fb10ba3ae23ca31a6f7e90266031f8b86535ca596bd9c430a3072c7dd24de17bd16c7fb14c09363b75e3b736c394af9a31ff38fec8bc99
|
7
|
+
data.tar.gz: 5ea8d27c496c4feaf169c2c0f107df06018e1e47b23e3eaf92ede64d0b7c69416cdac50985c8d85be500453e14e203f337df37118527573ed42d2fe981b3d30a
|
data/lib/rails_runner/config.rb
CHANGED
data/lib/rails_runner/version.rb
CHANGED
data/lib/rails_runner/worker.rb
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
module RailsRunner
|
2
2
|
class Worker
|
3
3
|
MUTEX = Mutex.new
|
4
|
-
FLUSH_PERIOD = 10.seconds
|
5
4
|
MAX_MULTIPLIER = 5
|
6
5
|
|
7
6
|
attr_accessor :requests
|
@@ -19,6 +18,7 @@ module RailsRunner
|
|
19
18
|
def initialize
|
20
19
|
@queue = Queue.new
|
21
20
|
@multiplier = 1
|
21
|
+
@flush_rate = RailsRunner.config.rate
|
22
22
|
reset
|
23
23
|
end
|
24
24
|
|
@@ -63,7 +63,7 @@ module RailsRunner
|
|
63
63
|
def start_flusher
|
64
64
|
Thread.new do
|
65
65
|
loop do
|
66
|
-
sleep @multiplier *
|
66
|
+
sleep @multiplier * @flush_rate
|
67
67
|
push(:flush)
|
68
68
|
end
|
69
69
|
end
|