uncharted-scheduler 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/scheduler/manager.rb +0 -3
- data/lib/scheduler/version.rb +1 -1
- data/lib/scheduler/views/scheduler.erb +57 -69
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 22af2912d477aba70cd7b7dd1a8e1990aeb970ea
|
4
|
+
data.tar.gz: ddefcdf0e45a4c188e79190866f53410d4d8bf7e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be6249a8da2ed34ab24191e7c7a944d98ae3a8d48062b5bd9f80b7d7f9673ba374f7349f4f8fcf7f91b85c760f3dffb9b1bebe49a412e32937441baa0160996a
|
7
|
+
data.tar.gz: 83f00303e70044a5aaa4cb2cbff765df54ca362888115731492c84f0f582aa868de2f30539047c0716df48b8d531ce637ce560265a5fbbcfeb199dff43cc078f
|
data/lib/scheduler/manager.rb
CHANGED
@@ -61,9 +61,6 @@ module Scheduler
|
|
61
61
|
info.prev_result = "RUNNING"
|
62
62
|
@mutex.synchronize { info.write! }
|
63
63
|
klass.new.perform
|
64
|
-
rescue Jobs::HandledExceptionWrapper
|
65
|
-
# Discourse.handle_exception was already called, and we don't have any extra info to give
|
66
|
-
failed = true
|
67
64
|
rescue => e
|
68
65
|
Scheduler.handle_job_exception(e, {message: "Running a scheduled job", job: klass})
|
69
66
|
failed = true
|
data/lib/scheduler/version.rb
CHANGED
@@ -1,72 +1,60 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
<
|
4
|
-
<div class="alert alert-danger text-center">
|
5
|
-
<h2>SIDEKIQ IS PAUSED!</h2>
|
6
|
-
</div>
|
7
|
-
</div>
|
8
|
-
<% end %>
|
9
|
-
<div class="col-sm-12">
|
10
|
-
<h3>Recurring Jobs</h3>
|
1
|
+
<% if Sidekiq.respond_to?(:paused?) && Sidekiq.paused? %>
|
2
|
+
<div class="alert alert-danger text-center">
|
3
|
+
<h2>SIDEKIQ IS PAUSED!</h2>
|
11
4
|
</div>
|
12
|
-
|
13
|
-
|
14
|
-
<div class="container">
|
15
|
-
<div class="row">
|
5
|
+
<% end %>
|
6
|
+
<h3>Recurring Jobs</h3>
|
16
7
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
<%= relative_time(Time.at(prev)) %>
|
40
|
-
<% end %>
|
41
|
-
</td>
|
42
|
-
<td>
|
43
|
-
<%= @info.prev_result %>
|
44
|
-
</td>
|
45
|
-
<td>
|
46
|
-
<%= @info.prev_duration %>
|
47
|
-
</td>
|
48
|
-
<td>
|
49
|
-
<%= @info.current_owner %>
|
50
|
-
</td>
|
51
|
-
<td>
|
52
|
-
<% next_run = @info.next_run %>
|
53
|
-
<% if next_run.nil? %>
|
54
|
-
Not Scheduled Yet
|
55
|
-
<% else %>
|
56
|
-
<%= relative_time(Time.at(next_run)) %>
|
57
|
-
<% end %>
|
58
|
-
</td>
|
59
|
-
<td>
|
60
|
-
<form action="<%= "#{root_path}scheduler/#{schedule}/trigger" %>" method="post">
|
61
|
-
<input class="btn btn-danger btn-small" type="submit" name="trigger" value="Trigger" data-confirm="Are you sure you want to trigger this job?" />
|
62
|
-
</form>
|
63
|
-
</td>
|
64
|
-
</tr>
|
8
|
+
<% if @schedules.length > 0 %>
|
9
|
+
<table class="table table-striped table-bordered table-white" style="width: 100%; margin: 0; table-layout:fixed;">
|
10
|
+
<thead>
|
11
|
+
<th style="width: 30%">Worker</th>
|
12
|
+
<th style="width: 15%">Last Run</th>
|
13
|
+
<th style="width: 15%">Last Result</th>
|
14
|
+
<th style="width: 15%">Last Duration</th>
|
15
|
+
<th style="width: 15%">Last Owner</th>
|
16
|
+
<th style="width: 15%">Next Run Due</th>
|
17
|
+
<th style="width: 10%">Actions</th>
|
18
|
+
</thead>
|
19
|
+
<% @schedules.each do |schedule| %>
|
20
|
+
<% @info = schedule.schedule_info %>
|
21
|
+
<tr>
|
22
|
+
<td>
|
23
|
+
<%= schedule %>
|
24
|
+
<td>
|
25
|
+
<% prev = @info.prev_run %>
|
26
|
+
<% if prev.nil? %>
|
27
|
+
Never
|
28
|
+
<% else %>
|
29
|
+
<%= relative_time(Time.at(prev)) %>
|
65
30
|
<% end %>
|
66
|
-
</
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
</
|
31
|
+
</td>
|
32
|
+
<td>
|
33
|
+
<%= @info.prev_result %>
|
34
|
+
</td>
|
35
|
+
<td>
|
36
|
+
<%= @info.prev_duration %>
|
37
|
+
</td>
|
38
|
+
<td>
|
39
|
+
<%= @info.current_owner %>
|
40
|
+
</td>
|
41
|
+
<td>
|
42
|
+
<% next_run = @info.next_run %>
|
43
|
+
<% if next_run.nil? %>
|
44
|
+
Not Scheduled Yet
|
45
|
+
<% else %>
|
46
|
+
<%= relative_time(Time.at(next_run)) %>
|
47
|
+
<% end %>
|
48
|
+
</td>
|
49
|
+
<td>
|
50
|
+
<form action="<%= "#{root_path}scheduler/#{schedule}/trigger" %>" method="post">
|
51
|
+
<%= csrf_tag %>
|
52
|
+
<input class="btn btn-danger btn-small" type="submit" name="trigger" value="Trigger" data-confirm="Are you sure you want to trigger this job?" />
|
53
|
+
</form>
|
54
|
+
</td>
|
55
|
+
</tr>
|
56
|
+
<% end %>
|
57
|
+
</table>
|
58
|
+
<% else %>
|
59
|
+
<div class="alert alert-success">No recurring jobs found.</div>
|
60
|
+
<% end %>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uncharted-scheduler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Saffron
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2016-05-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|