roundhouse-x 0.1.0 → 0.2.0
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.
- checksums.yaml +4 -4
- data/README.md +39 -8
- data/lib/roundhouse.rb +11 -3
- data/lib/roundhouse/api.rb +1 -1
- data/lib/roundhouse/cli.rb +10 -32
- data/lib/roundhouse/fetch.rb +4 -2
- data/lib/roundhouse/launcher.rb +1 -1
- data/lib/roundhouse/monitor.rb +137 -36
- data/lib/roundhouse/processor.rb +2 -3
- data/lib/roundhouse/scheduled.rb +1 -0
- data/lib/roundhouse/script.rb +49 -0
- data/lib/roundhouse/version.rb +1 -1
- data/lib/roundhouse/web.rb +13 -10
- data/roundhouse.gemspec +1 -0
- data/test/test_cli.rb +1 -95
- data/test/test_fetch.rb +13 -45
- data/test/test_monitor.rb +307 -28
- data/test/test_processor.rb +2 -2
- data/web/assets/javascripts/dashboard.js +5 -0
- data/web/views/_summary.erb +20 -0
- data/web/views/busy.erb +0 -2
- metadata +17 -2
data/test/test_processor.rb
CHANGED
@@ -41,8 +41,8 @@ class TestProcessor < Roundhouse::Test
|
|
41
41
|
@boss.expect(:async, actor, [])
|
42
42
|
@processor.process(work(msg))
|
43
43
|
|
44
|
-
# After being finished, the q_id should be put back into
|
45
|
-
queue_id = Roundhouse.redis { |conn| conn.lrange(
|
44
|
+
# After being finished, the q_id should be put back into rotation
|
45
|
+
queue_id = Roundhouse.redis { |conn| conn.lrange(Roundhouse::Monitor::TURNTABLE, 0, 0).first }
|
46
46
|
assert_equal '100', queue_id
|
47
47
|
|
48
48
|
@boss.verify
|
@@ -215,6 +215,11 @@ var updateStatsSummary = function(data) {
|
|
215
215
|
$('ul.summary li.retries span.count').html(data.retries.numberWithDelimiter())
|
216
216
|
$('ul.summary li.enqueued span.count').html(data.enqueued.numberWithDelimiter())
|
217
217
|
$('ul.summary li.dead span.count').html(data.dead.numberWithDelimiter())
|
218
|
+
$('ul.summary li.in-rotation span.count').html(data.in_rotation.numberWithDelimiter())
|
219
|
+
$('ul.summary li.queues span.count').html(data.num_queues.numberWithDelimiter())
|
220
|
+
$('ul.summary li.empty-queues span.count').html(data.num_empty_queues.numberWithDelimiter())
|
221
|
+
$('ul.summary li.suspended-queues span.count').html(data.num_suspended_queues.numberWithDelimiter())
|
222
|
+
$('ul.summary li.avg-queue-len span.count').html(data.avg_queue_len.numberWithDelimiter())
|
218
223
|
|
219
224
|
}
|
220
225
|
|
data/web/views/_summary.erb
CHANGED
@@ -37,4 +37,24 @@
|
|
37
37
|
<span class="desc"><%= t('Dead') %></span>
|
38
38
|
</a>
|
39
39
|
</li>
|
40
|
+
<li class="in-rotation col-sm-1">
|
41
|
+
<span class="count"><%= number_with_delimiter(stats.in_rotation) %></span>
|
42
|
+
<span class="desc"><%= t('In Rotation') %></span>
|
43
|
+
</li>
|
44
|
+
<li class="queues col-sm-1">
|
45
|
+
<span class="count"><%= number_with_delimiter(stats.num_queues) %></span>
|
46
|
+
<span class="desc"><%= t('Queues') %></span>
|
47
|
+
</li>
|
48
|
+
<li class="empty-queues col-sm-1">
|
49
|
+
<span class="count"><%= number_with_delimiter(stats.num_empty_queues) %></span>
|
50
|
+
<span class="desc"><%= t('Empty') %></span>
|
51
|
+
</li>
|
52
|
+
<li class="suspended-queues col-sm-1">
|
53
|
+
<span class="count"><%= number_with_delimiter(stats.num_suspended_queues) %></span>
|
54
|
+
<span class="desc"><%= t('Suspended') %></span>
|
55
|
+
</li>
|
56
|
+
<li class="avg-queue-len col-sm-1">
|
57
|
+
<span class="count"><%= number_with_delimiter(stats.avg_queue_len) %></span>
|
58
|
+
<span class="desc"><%= t('Avg Queue Len') %></span>
|
59
|
+
</li>
|
40
60
|
</ul>
|
data/web/views/busy.erb
CHANGED
@@ -32,8 +32,6 @@
|
|
32
32
|
<span class="label label-info"><%= label %></span>
|
33
33
|
<% end %>
|
34
34
|
<br>
|
35
|
-
<b><%= "#{t('Queues')}: " %></b>
|
36
|
-
<%= process['queues'] * ", " %>
|
37
35
|
</td>
|
38
36
|
<td><%= relative_time(Time.at(process['started_at'])) %></td>
|
39
37
|
<td><%= process['concurrency'] %></td>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: roundhouse-x
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ho-Sheng Hsiao
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-08-
|
12
|
+
date: 2015-08-31 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: redis
|
@@ -99,6 +99,20 @@ dependencies:
|
|
99
99
|
- - "~>"
|
100
100
|
- !ruby/object:Gem::Version
|
101
101
|
version: '1.0'
|
102
|
+
- !ruby/object:Gem::Dependency
|
103
|
+
name: wolverine
|
104
|
+
requirement: !ruby/object:Gem::Requirement
|
105
|
+
requirements:
|
106
|
+
- - "~>"
|
107
|
+
- !ruby/object:Gem::Version
|
108
|
+
version: 0.3.3
|
109
|
+
type: :runtime
|
110
|
+
prerelease: false
|
111
|
+
version_requirements: !ruby/object:Gem::Requirement
|
112
|
+
requirements:
|
113
|
+
- - "~>"
|
114
|
+
- !ruby/object:Gem::Version
|
115
|
+
version: 0.3.3
|
102
116
|
- !ruby/object:Gem::Dependency
|
103
117
|
name: sinatra
|
104
118
|
requirement: !ruby/object:Gem::Requirement
|
@@ -219,6 +233,7 @@ files:
|
|
219
233
|
- lib/roundhouse/rails.rb
|
220
234
|
- lib/roundhouse/redis_connection.rb
|
221
235
|
- lib/roundhouse/scheduled.rb
|
236
|
+
- lib/roundhouse/script.rb
|
222
237
|
- lib/roundhouse/testing.rb
|
223
238
|
- lib/roundhouse/testing/inline.rb
|
224
239
|
- lib/roundhouse/util.rb
|