hayabusa 0.0.6 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/hayabusa.gemspec +2 -2
- data/lib/hayabusa_ext/threadding.rb +4 -1
- data/spec/hayabusa_spec.rb +6 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.8
|
data/hayabusa.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{hayabusa}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.8"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Kasper Johansen"]
|
12
|
-
s.date = %q{2012-08-
|
12
|
+
s.date = %q{2012-08-27}
|
13
13
|
s.description = %q{A threadded web/app-server that focuses on threadding, shared ressources, speed and more.}
|
14
14
|
s.email = %q{k@spernj.org}
|
15
15
|
s.executables = ["check_running.rb", "hayabusa_benchmark.rb", "hayabusa_cgi.rb", "hayabusa_fcgi.fcgi", "hayabusa_fcgi.rb", "knjappserver_start.rb"]
|
@@ -3,7 +3,10 @@ class Hayabusa
|
|
3
3
|
@config[:threadding] = {} if !@config.has_key?(:threadding)
|
4
4
|
@config[:threadding][:max_running] = 8 if !@config[:threadding].has_key?(:max_running)
|
5
5
|
|
6
|
-
|
6
|
+
threadpool_args = {:threads => @config[:threadding][:max_running]}
|
7
|
+
threadpool_args[:priority] = @config[:threadding][:priority] if @config[:threadding].key?(:priority)
|
8
|
+
|
9
|
+
@threadpool = Tpool.new(threadpool_args)
|
7
10
|
@threadpool.on_error(&self.method(:threadpool_on_error))
|
8
11
|
end
|
9
12
|
|
data/spec/hayabusa_spec.rb
CHANGED
@@ -23,13 +23,18 @@ describe "Hayabusa" do
|
|
23
23
|
:doc_root => "#{File.dirname(__FILE__)}/../pages",
|
24
24
|
:locales_gettext_funcs => true,
|
25
25
|
:locale_default => "da_DK",
|
26
|
-
:db => db
|
26
|
+
:db => db,
|
27
|
+
:threadding => {
|
28
|
+
:priority => -3
|
29
|
+
}
|
27
30
|
)
|
28
31
|
|
29
32
|
$appserver.vars[:test] = "kasper"
|
30
33
|
$appserver.define_magic_var(:_testvar1, "Kasper")
|
31
34
|
$appserver.define_magic_var(:_testvar2, "Johansen")
|
32
35
|
$appserver.start
|
36
|
+
|
37
|
+
raise "Expected thread-pool-priority to be '-3' but it wasnt: '#{$appserver.threadpool.args[:priority]}'." if $appserver.threadpool.args[:priority] != -3
|
33
38
|
end
|
34
39
|
|
35
40
|
it "should be able to handle a GET-request." do
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: hayabusa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.8
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Kasper Johansen
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2012-08-
|
13
|
+
date: 2012-08-27 00:00:00 +02:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -250,7 +250,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
250
250
|
requirements:
|
251
251
|
- - ">="
|
252
252
|
- !ruby/object:Gem::Version
|
253
|
-
hash:
|
253
|
+
hash: -2842132418844867666
|
254
254
|
segments:
|
255
255
|
- 0
|
256
256
|
version: "0"
|