testbot 0.3.6 → 0.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG +4 -0
- data/README.markdown +1 -1
- data/lib/runner.rb +8 -4
- data/lib/testbot.rb +1 -1
- metadata +4 -4
data/CHANGELOG
CHANGED
data/README.markdown
CHANGED
@@ -68,7 +68,7 @@ Using testbot with Rails 3:
|
|
68
68
|
|
69
69
|
Using testbot with Rails 2:
|
70
70
|
|
71
|
-
ruby script/plugin install git://github.com/joakimk/testbot.git -r 'refs/tags/v0.3.
|
71
|
+
ruby script/plugin install git://github.com/joakimk/testbot.git -r 'refs/tags/v0.3.7'
|
72
72
|
script/generate testbot --connect 192.168.0.100
|
73
73
|
|
74
74
|
rake testbot:spec (or :test, :features)
|
data/lib/runner.rb
CHANGED
@@ -5,7 +5,8 @@ require 'ostruct'
|
|
5
5
|
require File.dirname(__FILE__) + '/shared/ssh_tunnel'
|
6
6
|
require File.dirname(__FILE__) + '/adapters/adapter'
|
7
7
|
|
8
|
-
|
8
|
+
TIME_BETWEEN_NORMAL_POLLS = 1
|
9
|
+
TIME_BETWEEN_QUICK_POLLS = 0.1
|
9
10
|
TIME_BETWEEN_PINGS = 5
|
10
11
|
TIME_BETWEEN_VERSION_CHECKS = 60
|
11
12
|
MAX_CPU_USAGE_WHEN_IDLE = 50
|
@@ -119,9 +120,11 @@ class Runner
|
|
119
120
|
end
|
120
121
|
|
121
122
|
def wait_for_jobs
|
123
|
+
last_check_found_a_job = false
|
122
124
|
loop do
|
123
|
-
sleep
|
124
|
-
|
125
|
+
sleep (last_check_found_a_job ? TIME_BETWEEN_QUICK_POLLS : TIME_BETWEEN_NORMAL_POLLS)
|
126
|
+
|
127
|
+
check_for_update if !last_check_found_a_job && time_for_update?
|
125
128
|
|
126
129
|
# Only get jobs from one requester at a time
|
127
130
|
next_params = base_params
|
@@ -138,7 +141,8 @@ class Runner
|
|
138
141
|
|
139
142
|
next_job = Server.get("/jobs/next", :query => next_params) rescue nil
|
140
143
|
next if next_job == nil
|
141
|
-
|
144
|
+
last_check_found_a_job = true
|
145
|
+
|
142
146
|
job = Job.new(*([ self, next_job.split(',') ].flatten))
|
143
147
|
if first_job_from_requester?
|
144
148
|
fetch_code(job)
|
data/lib/testbot.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: testbot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 7
|
10
|
+
version: 0.3.7
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- "Joakim Kolsj\xC3\xB6"
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-
|
18
|
+
date: 2010-12-01 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|