sidekiq-cron 1.2.0 → 1.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +122 -0
- data/Gemfile +1 -30
- data/README.md +151 -121
- data/Rakefile +3 -42
- data/lib/sidekiq/cron/job.rb +139 -104
- data/lib/sidekiq/cron/launcher.rb +7 -9
- data/lib/sidekiq/cron/locales/en.yml +2 -0
- data/lib/sidekiq/cron/locales/pt.yml +22 -0
- data/lib/sidekiq/cron/poller.rb +18 -9
- data/lib/sidekiq/cron/schedule_loader.rb +22 -0
- data/lib/sidekiq/cron/support.rb +0 -1
- data/lib/sidekiq/cron/version.rb +7 -0
- data/lib/sidekiq/cron/views/cron.erb +19 -13
- data/lib/sidekiq/cron/views/cron_show.erb +8 -8
- data/lib/sidekiq/cron/web.rb +1 -7
- data/lib/sidekiq/cron/web_extension.rb +8 -21
- data/lib/sidekiq/cron.rb +1 -0
- data/lib/sidekiq/options.rb +18 -0
- data/sidekiq-cron.gemspec +25 -115
- data/test/integration/performance_test.rb +4 -5
- data/test/test_helper.rb +11 -23
- data/test/unit/fixtures/schedule_array.yml +13 -0
- data/test/unit/fixtures/schedule_hash.yml +12 -0
- data/test/unit/fixtures/schedule_string.yml +1 -0
- data/test/unit/job_test.rb +227 -23
- data/test/unit/poller_test.rb +7 -9
- data/test/unit/schedule_loader_test.rb +45 -0
- data/test/unit/web_extension_test.rb +40 -40
- metadata +56 -197
- data/.document +0 -5
- data/.travis.yml +0 -18
- data/Changes.md +0 -82
- data/Dockerfile +0 -32
- data/VERSION +0 -1
- data/config.ru +0 -14
- data/docker-compose.yml +0 -23
- data/examples/web-cron-ui.png +0 -0
- data/lib/sidekiq/cron/views/cron.slim +0 -71
- data/lib/sidekiq/cron/views/cron_show.slim +0 -61
@@ -1,61 +0,0 @@
|
|
1
|
-
header.row
|
2
|
-
.span.col-sm-5.pull-left
|
3
|
-
h3
|
4
|
-
= "#{t('Cron')} #{t('Job')}"
|
5
|
-
small= @job.name
|
6
|
-
.span.col-sm-7.pull-right style=("margin-top: 20px; margin-bottom: 10px;")
|
7
|
-
- cron_job_path = "#{root_path}cron/#{CGI.escape(@job.name).gsub('+', '%20')}"
|
8
|
-
form.pull-right action="#{cron_job_path}/enque?redirect=#{cron_job_path}" method="post"
|
9
|
-
= csrf_tag if respond_to?(:csrf_tag)
|
10
|
-
input.btn.btn-small.pull-left name="enque" type="submit" value="#{t('EnqueueNow')}"
|
11
|
-
- if @job.status == 'enabled'
|
12
|
-
form.pull-right action="#{cron_job_path}/disable?redirect=#{cron_job_path}" method="post"
|
13
|
-
= csrf_tag if respond_to?(:csrf_tag)
|
14
|
-
input.btn.btn-small.pull-left name="disable" type="submit" value="#{t('Disable')}"
|
15
|
-
- else
|
16
|
-
form.pull-right action="#{cron_job_path}/enable?redirect=#{cron_job_path}" method="post"
|
17
|
-
= csrf_tag if respond_to?(:csrf_tag)
|
18
|
-
input.btn.btn-small.pull-left name="enable" type="submit" value="#{t('Enable')}"
|
19
|
-
form.pull-right action="#{cron_job_path}/delete" method="post"
|
20
|
-
= csrf_tag if respond_to?(:csrf_tag)
|
21
|
-
input.btn.btn-danger.btn-small data-confirm="#{t('AreYouSureDeleteCronJob' job =@job.name)}" name="delete" type="submit" value="#{t('Delete')}" /
|
22
|
-
|
23
|
-
table.table.table-bordered.table-striped
|
24
|
-
tbody
|
25
|
-
tr
|
26
|
-
th= t 'Status'
|
27
|
-
td= @job.status
|
28
|
-
tr
|
29
|
-
th= t 'Name'
|
30
|
-
td= @job.name
|
31
|
-
tr
|
32
|
-
th= t 'Description'
|
33
|
-
td= @job.description
|
34
|
-
tr
|
35
|
-
th= t 'Message'
|
36
|
-
td
|
37
|
-
pre= @job.pretty_message
|
38
|
-
tr
|
39
|
-
th= t 'Cron'
|
40
|
-
td= @job.cron.gsub(" ", " ")
|
41
|
-
tr
|
42
|
-
th= t 'Last enqueued'
|
43
|
-
td= @job.last_enqueue_time ? relative_time(@job.last_enqueue_time) : "-"
|
44
|
-
|
45
|
-
header.row
|
46
|
-
.col-sm-12
|
47
|
-
h4= t 'History'
|
48
|
-
|
49
|
-
- if @job.jid_history_from_redis.size > 0
|
50
|
-
table.table.table-hover.table-bordered.table-striped
|
51
|
-
thead
|
52
|
-
tr
|
53
|
-
th= t 'Enqueued'
|
54
|
-
th= t 'JID'
|
55
|
-
tbody
|
56
|
-
- @job.jid_history_from_redis.each do |jid_history|
|
57
|
-
tr
|
58
|
-
td= jid_history['enqueued']
|
59
|
-
td= jid_history['jid']
|
60
|
-
- else
|
61
|
-
.alert.alert-success= t 'NoHistoryWereFound'
|