sidekiq-cron 1.3.0 → 1.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Changes.md +103 -90
- data/README.md +96 -125
- data/Rakefile +3 -24
- data/lib/sidekiq/cron/job.rb +4 -9
- data/lib/sidekiq/cron/locales/pt.yml +22 -0
- data/lib/sidekiq/cron/poller.rb +17 -5
- data/lib/sidekiq/cron/version.rb +1 -1
- data/lib/sidekiq/cron/views/cron.erb +18 -12
- 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 +2 -12
- data/lib/sidekiq/cron.rb +0 -1
- data/sidekiq-cron.gemspec +11 -18
- data/test/integration/performance_test.rb +0 -1
- data/test/test_helper.rb +1 -14
- data/test/unit/job_test.rb +2 -4
- data/test/unit/poller_test.rb +0 -2
- data/test/unit/web_extension_test.rb +0 -1
- metadata +30 -50
- data/.document +0 -5
- data/Dockerfile +0 -32
- 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
@@ -0,0 +1,22 @@
|
|
1
|
+
pt:
|
2
|
+
Job: Tarefa
|
3
|
+
Cron: Cron
|
4
|
+
CronJobs: Tarefas do Cron
|
5
|
+
EnqueueNow: Enfileirar agora
|
6
|
+
EnableAll: Habilitar todos
|
7
|
+
DisableAll: Desabilitar todos
|
8
|
+
EnqueueAll: Enfileirar todos
|
9
|
+
DeleteAll: Excluir todos
|
10
|
+
'Cron string': Cron
|
11
|
+
AreYouSureEnqueueCronJobs: Tem certeza de que deseja enfileirar TODOS as tarefas?
|
12
|
+
AreYouSureEnqueueCronJob: Tem certeza de que deseja enfileirar a tarefa %{job}?
|
13
|
+
AreYouSureDeleteCronJobs: Tem certeza de que deseja excluir TODOS as tarefas?
|
14
|
+
AreYouSureDeleteCronJob: Tem certeza de que deseja excluir a tarefa %{job}?
|
15
|
+
NoCronJobsWereFound: Nenhuma tarefa foi encontrada
|
16
|
+
Enable: Habilitar
|
17
|
+
Disable: Desabilitar
|
18
|
+
'Last enqueued': Último enfileirado
|
19
|
+
disabled: desabilitado
|
20
|
+
enabled: habilitado
|
21
|
+
NoHistoryWereFound: Nenhum histórico foi encontrado
|
22
|
+
Description: Descrição
|
data/lib/sidekiq/cron/poller.rb
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
require 'sidekiq'
|
2
|
-
require 'sidekiq/util'
|
3
2
|
require 'sidekiq/cron'
|
4
3
|
require 'sidekiq/scheduled'
|
5
4
|
|
@@ -9,6 +8,23 @@ module Sidekiq
|
|
9
8
|
|
10
9
|
# The Poller checks Redis every N seconds for sheduled cron jobs
|
11
10
|
class Poller < Sidekiq::Scheduled::Poller
|
11
|
+
def initialize
|
12
|
+
Sidekiq.configure_server do |config|
|
13
|
+
if config.respond_to?(:[])
|
14
|
+
config[:poll_interval_average] = config[:average_scheduled_poll_interval] || POLL_INTERVAL
|
15
|
+
else
|
16
|
+
config.options[:poll_interval_average] = config.options[:average_scheduled_poll_interval] || POLL_INTERVAL
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
if Gem::Version.new(Sidekiq::VERSION) >= Gem::Version.new("6.5.0")
|
21
|
+
# Sidekiq Poller init requires a config argument
|
22
|
+
super(Sidekiq)
|
23
|
+
else
|
24
|
+
super
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
12
28
|
def enqueue
|
13
29
|
time = Time.now.utc
|
14
30
|
Sidekiq::Cron::Job.all.each do |job|
|
@@ -32,10 +48,6 @@ module Sidekiq
|
|
32
48
|
Sidekiq.logger.error "CRON JOB: #{ex.backtrace.first}"
|
33
49
|
handle_exception(ex) if respond_to?(:handle_exception)
|
34
50
|
end
|
35
|
-
|
36
|
-
def poll_interval_average
|
37
|
-
Sidekiq.options[:average_scheduled_poll_interval] || Sidekiq.options[:poll_interval] || POLL_INTERVAL
|
38
|
-
end
|
39
51
|
end
|
40
52
|
end
|
41
53
|
end
|
data/lib/sidekiq/cron/version.rb
CHANGED
@@ -6,19 +6,19 @@
|
|
6
6
|
<% if @cron_jobs.size > 0 %>
|
7
7
|
<form action="<%= root_path %>cron/__all__/delete" method="post" class="pull-right">
|
8
8
|
<%= csrf_tag if respond_to?(:csrf_tag) %>
|
9
|
-
<input class="btn btn-
|
9
|
+
<input class="btn btn-danger" type="submit" name="delete" value="<%= t('DeleteAll') %>" data-confirm="<%= t('AreYouSureDeleteCronJobs') %>" />
|
10
10
|
</form>
|
11
11
|
<form action="<%= root_path %>cron/__all__/disable" method="post" class="pull-right">
|
12
12
|
<%= csrf_tag if respond_to?(:csrf_tag) %>
|
13
|
-
<input class="btn btn-
|
13
|
+
<input class="btn btn-warn" type="submit" name="enque" value="<%= t('DisableAll') %>" />
|
14
14
|
</form>
|
15
15
|
<form action="<%= root_path %>cron/__all__/enable" method="post" class="pull-right">
|
16
16
|
<%= csrf_tag if respond_to?(:csrf_tag) %>
|
17
|
-
<input class="btn btn-
|
17
|
+
<input class="btn btn-warn" type="submit" name="enque" value="<%= t('EnableAll') %>" />
|
18
18
|
</form>
|
19
19
|
<form action="<%= root_path %>cron/__all__/enque" method="post" class="pull-right">
|
20
20
|
<%= csrf_tag if respond_to?(:csrf_tag) %>
|
21
|
-
<input class="btn btn-
|
21
|
+
<input class="btn btn-warn" type="submit" name="enque" value="<%= t('EnqueueAll') %>" data-confirm="<%= t('AreYouSureEnqueueCronJobs') %>" />
|
22
22
|
</form>
|
23
23
|
<% end %>
|
24
24
|
</div>
|
@@ -37,7 +37,7 @@
|
|
37
37
|
|
38
38
|
<tbody>
|
39
39
|
<% @cron_jobs.sort{|a,b| a.sort_name <=> b.sort_name }.each_with_index do |job, index| %>
|
40
|
-
<% style = "#{job.status == 'disabled' ? "background: #ecc": ""}" %>
|
40
|
+
<% style = "#{job.status == 'disabled' ? "background: #ecc; color: #585454;": ""}" %>
|
41
41
|
<tr>
|
42
42
|
<td style="<%= style %>"><%= t job.status %></td>
|
43
43
|
<td style="<%= style %>">
|
@@ -47,9 +47,15 @@
|
|
47
47
|
<hr style="margin:3px;border:0;">
|
48
48
|
<small>
|
49
49
|
<% if job.message and job.message.to_s.size > 100 %>
|
50
|
-
|
51
|
-
|
52
|
-
|
50
|
+
<% if Gem::Version.new(Sidekiq::VERSION) >= Gem::Version.new("6.3.0") %>
|
51
|
+
<button data-toggle="job_<%= index %>" class="btn btn-warn btn-xs"><%= t('ShowAll')%></button>
|
52
|
+
<div class="toggle" id="job_<%= index %>" style="display: inline;"><%= job.message[0..100] + "... " %></div>
|
53
|
+
<div class="toggle" id="job_<%= index %>_full" style="display: none;"><%= job.message %></div>
|
54
|
+
<% else %>
|
55
|
+
<button data-toggle="collapse" data-target=".worker_<%= index %>" class="btn btn-warn btn-xs"><%= t('ShowAll')%></button>
|
56
|
+
<div class="toggle worker_<%= index %>" style="display: inline;"><%= job.message[0..100] + "... " %></div>
|
57
|
+
<div class="toggle worker_<%= index %>" style="display: none;"><%= job.message %></div>
|
58
|
+
<% end %>
|
53
59
|
<% else %>
|
54
60
|
<%= job.message %>
|
55
61
|
<% end %>
|
@@ -61,20 +67,20 @@
|
|
61
67
|
<% if job.status == 'enabled' %>
|
62
68
|
<form action="<%= root_path %>cron/<%= CGI.escape(job.name).gsub('+', '%20') %>/enque" method="post">
|
63
69
|
<%= csrf_tag if respond_to?(:csrf_tag) %>
|
64
|
-
<input class='btn btn-xs pull-left' type="submit" name="enque" value="<%= t('EnqueueNow') %>" data-confirm="<%= t('AreYouSureEnqueueCronJob', :job => job.name) %>"/>
|
70
|
+
<input class='btn btn-warn btn-xs pull-left' type="submit" name="enque" value="<%= t('EnqueueNow') %>" data-confirm="<%= t('AreYouSureEnqueueCronJob', :job => job.name) %>"/>
|
65
71
|
</form>
|
66
72
|
<form action="<%= root_path %>cron/<%= CGI.escape(job.name).gsub('+', '%20') %>/disable" method="post">
|
67
73
|
<%= csrf_tag if respond_to?(:csrf_tag) %>
|
68
|
-
<input class='btn btn-xs pull-left' type="submit" name="disable" value="<%= t('Disable') %>"/>
|
74
|
+
<input class='btn btn-warn btn-xs pull-left' type="submit" name="disable" value="<%= t('Disable') %>"/>
|
69
75
|
</form>
|
70
76
|
<% else %>
|
71
77
|
<form action="<%= root_path %>cron/<%= CGI.escape(job.name).gsub('+', '%20') %>/enque" method="post">
|
72
78
|
<%= csrf_tag if respond_to?(:csrf_tag) %>
|
73
|
-
<input class='btn btn-xs pull-left' type="submit" name="enque" value="<%= t('EnqueueNow') %>"/>
|
79
|
+
<input class='btn btn-warn btn-xs pull-left' type="submit" name="enque" value="<%= t('EnqueueNow') %>"/>
|
74
80
|
</form>
|
75
81
|
<form action="<%= root_path %>cron/<%= CGI.escape(job.name).gsub('+', '%20') %>/enable" method="post">
|
76
82
|
<%= csrf_tag if respond_to?(:csrf_tag) %>
|
77
|
-
<input class='btn btn-xs pull-left' type="submit" name="enable" value="<%= t('Enable') %>"/>
|
83
|
+
<input class='btn btn-warn btn-xs pull-left' type="submit" name="enable" value="<%= t('Enable') %>"/>
|
78
84
|
</form>
|
79
85
|
<form action="<%= root_path %>cron/<%= CGI.escape(job.name).gsub('+', '%20') %>/delete" method="post">
|
80
86
|
<%= csrf_tag if respond_to?(:csrf_tag) %>
|
@@ -7,23 +7,23 @@
|
|
7
7
|
</div>
|
8
8
|
<div class="span col-sm-7 pull-right" style="margin-top: 20px; margin-bottom: 10px;">
|
9
9
|
<% cron_job_path = "#{root_path}cron/#{CGI.escape(@job.name).gsub('+', '%20')}" %>
|
10
|
-
<form action="<%= cron_job_path %>/enque?redirect=<%= cron_job_path %>"
|
10
|
+
<form action="<%= cron_job_path %>/enque?redirect=<%= cron_job_path %>" method="post">
|
11
11
|
<%= csrf_tag if respond_to?(:csrf_tag) %>
|
12
|
-
<input class="btn btn-
|
12
|
+
<input class="btn btn-warn pull-left" name="enque" type="submit" value="<%= t('EnqueueNow') %>" data-confirm="<%= t('AreYouSureEnqueueCronJob', :job => @job.name) %>" />
|
13
13
|
</form>
|
14
14
|
<% if @job.status == 'enabled' %>
|
15
|
-
<form action="<%= cron_job_path %>/disable?redirect=<%= cron_job_path %>"
|
15
|
+
<form action="<%= cron_job_path %>/disable?redirect=<%= cron_job_path %>" method="post">
|
16
16
|
<%= csrf_tag if respond_to?(:csrf_tag) %>
|
17
|
-
<input class="btn btn-
|
17
|
+
<input class="btn btn-warn pull-left" name="disable" type="submit" value="<%= t('Disable') %>" />
|
18
18
|
</form>
|
19
19
|
<% else %>
|
20
|
-
<form action="<%= cron_job_path %>/enable?redirect=<%= cron_job_path %>"
|
20
|
+
<form action="<%= cron_job_path %>/enable?redirect=<%= cron_job_path %>" method="post">
|
21
21
|
<%= csrf_tag if respond_to?(:csrf_tag) %>
|
22
|
-
<input class="btn btn-
|
22
|
+
<input class="btn btn-warn pull-left" name="enable" type="submit" value="<%= t('Enable') %>" />
|
23
23
|
</form>
|
24
|
-
<form action="<%= cron_job_path %>/delete"
|
24
|
+
<form action="<%= cron_job_path %>/delete" method="post">
|
25
25
|
<%= csrf_tag if respond_to?(:csrf_tag) %>
|
26
|
-
<input class="btn btn-danger
|
26
|
+
<input class="btn btn-danger" data-confirm="<%= t('AreYouSureDeleteCronJob', :job => @job.name) %>" name="delete" type="submit" value="<%= t('Delete') %>" />
|
27
27
|
</form>
|
28
28
|
<% end %>
|
29
29
|
</div>
|
data/lib/sidekiq/cron/web.rb
CHANGED
@@ -3,11 +3,5 @@ require "sidekiq/cron/job"
|
|
3
3
|
|
4
4
|
if defined?(Sidekiq::Web)
|
5
5
|
Sidekiq::Web.register Sidekiq::Cron::WebExtension
|
6
|
-
|
7
|
-
if Sidekiq::Web.tabs.is_a?(Array)
|
8
|
-
# For sidekiq < 2.5
|
9
|
-
Sidekiq::Web.tabs << "cron"
|
10
|
-
else
|
11
|
-
Sidekiq::Web.tabs["Cron"] = "cron"
|
12
|
-
end
|
6
|
+
Sidekiq::Web.tabs["Cron"] = "cron"
|
13
7
|
end
|
@@ -12,12 +12,7 @@ module Sidekiq
|
|
12
12
|
|
13
13
|
@cron_jobs = Sidekiq::Cron::Job.all
|
14
14
|
|
15
|
-
|
16
|
-
if defined?(Slim) && File.exists?(File.join(settings.views,"layout.slim"))
|
17
|
-
render(:slim, File.read(File.join(view_path, "cron.slim")))
|
18
|
-
else
|
19
|
-
render(:erb, File.read(File.join(view_path, "cron.erb")))
|
20
|
-
end
|
15
|
+
render(:erb, File.read(File.join(view_path, "cron.erb")))
|
21
16
|
end
|
22
17
|
|
23
18
|
# display job detail + jid history
|
@@ -26,12 +21,7 @@ module Sidekiq
|
|
26
21
|
|
27
22
|
@job = Sidekiq::Cron::Job.find(route_params[:name])
|
28
23
|
if @job
|
29
|
-
|
30
|
-
if defined?(Slim) && File.exists?(File.join(settings.views,"layout.slim"))
|
31
|
-
render(:slim, File.read(File.join(view_path, "cron_show.slim")))
|
32
|
-
else
|
33
|
-
render(:erb, File.read(File.join(view_path, "cron_show.erb")))
|
34
|
-
end
|
24
|
+
render(:erb, File.read(File.join(view_path, "cron_show.erb")))
|
35
25
|
else
|
36
26
|
redirect "#{root_path}cron"
|
37
27
|
end
|
data/lib/sidekiq/cron.rb
CHANGED
data/sidekiq-cron.gemspec
CHANGED
@@ -3,13 +3,12 @@
|
|
3
3
|
require './lib/sidekiq/cron/version'
|
4
4
|
|
5
5
|
Gem::Specification.new do |s|
|
6
|
-
s.name = "sidekiq-cron"
|
6
|
+
s.name = "sidekiq-cron"
|
7
7
|
s.version = Sidekiq::Cron::VERSION
|
8
8
|
|
9
|
-
s.required_ruby_version = ">= 2.
|
9
|
+
s.required_ruby_version = ">= 2.6"
|
10
10
|
s.require_paths = ["lib"]
|
11
11
|
s.authors = ["Ondrej Bartas"]
|
12
|
-
s.date = "2020-04-03"
|
13
12
|
s.description = "Enables to set jobs to be run in specified time (using CRON notation)"
|
14
13
|
s.email = "ondrej@bartas.cz"
|
15
14
|
s.extra_rdoc_files = [
|
@@ -17,32 +16,26 @@ Gem::Specification.new do |s|
|
|
17
16
|
"README.md"
|
18
17
|
]
|
19
18
|
s.files = Dir.glob('lib/**/*') + Dir.glob('test/**/*') + [
|
20
|
-
".document",
|
21
19
|
"Changes.md",
|
22
|
-
"Dockerfile",
|
23
|
-
"config.ru",
|
24
|
-
"docker-compose.yml",
|
25
|
-
"examples/web-cron-ui.png",
|
26
20
|
"Gemfile",
|
27
21
|
"LICENSE.txt",
|
28
22
|
"Rakefile",
|
29
23
|
"README.md",
|
30
24
|
"sidekiq-cron.gemspec",
|
31
25
|
]
|
32
|
-
|
26
|
+
|
33
27
|
s.homepage = "https://github.com/ondrejbartas/sidekiq-cron"
|
34
28
|
s.licenses = ["MIT"]
|
35
|
-
s.summary = "Sidekiq
|
29
|
+
s.summary = "Sidekiq-Cron helps to add repeated scheduled jobs"
|
36
30
|
|
37
|
-
s.add_dependency("fugit", "
|
31
|
+
s.add_dependency("fugit", "~> 1")
|
38
32
|
s.add_dependency("sidekiq", ">= 4.2.1")
|
39
33
|
|
40
|
-
s.add_development_dependency("minitest", "
|
41
|
-
s.add_development_dependency("mocha", "
|
42
|
-
s.add_development_dependency("redis-namespace", "
|
43
|
-
s.add_development_dependency("rack", "~> 2.
|
44
|
-
s.add_development_dependency("rack-test", "~> 1.
|
34
|
+
s.add_development_dependency("minitest", "~> 5.15")
|
35
|
+
s.add_development_dependency("mocha", "~> 1.14")
|
36
|
+
s.add_development_dependency("redis-namespace", "~> 1.8")
|
37
|
+
s.add_development_dependency("rack", "~> 2.2")
|
38
|
+
s.add_development_dependency("rack-test", "~> 1.1")
|
45
39
|
s.add_development_dependency("rake", "~> 13.0")
|
46
|
-
s.add_development_dependency("
|
47
|
-
s.add_development_dependency("simplecov", ">= 0")
|
40
|
+
s.add_development_dependency("simplecov", "~> 0.21")
|
48
41
|
end
|
data/test/test_helper.rb
CHANGED
@@ -1,26 +1,17 @@
|
|
1
1
|
$TESTING = true
|
2
|
+
ENV['RACK_ENV'] = 'test'
|
2
3
|
|
3
4
|
require 'simplecov'
|
4
5
|
SimpleCov.start do
|
5
6
|
add_filter "/test/"
|
6
|
-
|
7
7
|
add_group 'SidekiqCron', 'lib/'
|
8
8
|
end
|
9
9
|
|
10
10
|
require "minitest/autorun"
|
11
|
-
require 'shoulda-context'
|
12
11
|
require "rack/test"
|
13
12
|
require 'mocha/minitest'
|
14
|
-
|
15
|
-
ENV['RACK_ENV'] = 'test'
|
16
|
-
|
17
|
-
#SIDEKIQ Require - need to have sidekiq running!
|
18
13
|
require 'sidekiq'
|
19
14
|
require "sidekiq-pro" if ENV['SIDEKIQ_PRO_VERSION']
|
20
|
-
require "sidekiq/processor"
|
21
|
-
require "sidekiq/fetch"
|
22
|
-
require "sidekiq/cli"
|
23
|
-
|
24
15
|
require 'sidekiq/web'
|
25
16
|
|
26
17
|
Sidekiq.logger.level = Logger::ERROR
|
@@ -32,12 +23,8 @@ Sidekiq.configure_client do |config|
|
|
32
23
|
config.redis = { :url => redis_url, :namespace => 'testy' }
|
33
24
|
end
|
34
25
|
|
35
|
-
|
36
|
-
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
37
|
-
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
38
26
|
require 'sidekiq-cron'
|
39
27
|
require 'sidekiq/cron/web'
|
40
|
-
require 'pp'
|
41
28
|
|
42
29
|
# For testing os symbilize args!
|
43
30
|
class Hash
|
data/test/unit/job_test.rb
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
# -*- encoding : utf-8 -*-
|
2
1
|
require './test/test_helper'
|
3
2
|
|
4
3
|
describe "Cron Job" do
|
@@ -929,11 +928,11 @@ describe "Cron Job" do
|
|
929
928
|
cron: "* * * * *",
|
930
929
|
klass: "CronTestClass"
|
931
930
|
}
|
932
|
-
#first time is
|
931
|
+
#first time is always
|
933
932
|
#after next cron time!
|
934
933
|
@time = Time.now.utc + 120
|
935
934
|
end
|
936
|
-
it "be
|
935
|
+
it "be always false when status is disabled" do
|
937
936
|
refute Sidekiq::Cron::Job.new(@args.merge(status: 'disabled')).should_enque? @time
|
938
937
|
refute Sidekiq::Cron::Job.new(@args.merge(status: 'disabled')).should_enque? @time - 60
|
939
938
|
refute Sidekiq::Cron::Job.new(@args.merge(status: 'disabled')).should_enque? @time - 120
|
@@ -1120,7 +1119,6 @@ describe "Cron Job" do
|
|
1120
1119
|
|
1121
1120
|
assert_equal Sidekiq::Cron::Job.all.first.sidekiq_worker_message, payload
|
1122
1121
|
end
|
1123
|
-
|
1124
1122
|
end
|
1125
1123
|
end
|
1126
1124
|
end
|
data/test/unit/poller_test.rb
CHANGED
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sidekiq-cron
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ondrej Bartas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-06-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fugit
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1
|
19
|
+
version: '1'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '1
|
26
|
+
version: '1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: sidekiq
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -42,72 +42,72 @@ dependencies:
|
|
42
42
|
name: minitest
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '5.15'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '5.15'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: mocha
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '1.14'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '1.14'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: redis-namespace
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - "
|
73
|
+
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 1.
|
75
|
+
version: '1.8'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - "
|
80
|
+
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 1.
|
82
|
+
version: '1.8'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: rack
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '2.
|
89
|
+
version: '2.2'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '2.
|
96
|
+
version: '2.2'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: rack-test
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: '1.
|
103
|
+
version: '1.1'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '1.
|
110
|
+
version: '1.1'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: rake
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -122,34 +122,20 @@ dependencies:
|
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '13.0'
|
125
|
-
- !ruby/object:Gem::Dependency
|
126
|
-
name: shoulda-context
|
127
|
-
requirement: !ruby/object:Gem::Requirement
|
128
|
-
requirements:
|
129
|
-
- - ">="
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
version: '0'
|
132
|
-
type: :development
|
133
|
-
prerelease: false
|
134
|
-
version_requirements: !ruby/object:Gem::Requirement
|
135
|
-
requirements:
|
136
|
-
- - ">="
|
137
|
-
- !ruby/object:Gem::Version
|
138
|
-
version: '0'
|
139
125
|
- !ruby/object:Gem::Dependency
|
140
126
|
name: simplecov
|
141
127
|
requirement: !ruby/object:Gem::Requirement
|
142
128
|
requirements:
|
143
|
-
- - "
|
129
|
+
- - "~>"
|
144
130
|
- !ruby/object:Gem::Version
|
145
|
-
version: '0'
|
131
|
+
version: '0.21'
|
146
132
|
type: :development
|
147
133
|
prerelease: false
|
148
134
|
version_requirements: !ruby/object:Gem::Requirement
|
149
135
|
requirements:
|
150
|
-
- - "
|
136
|
+
- - "~>"
|
151
137
|
- !ruby/object:Gem::Version
|
152
|
-
version: '0'
|
138
|
+
version: '0.21'
|
153
139
|
description: Enables to set jobs to be run in specified time (using CRON notation)
|
154
140
|
email: ondrej@bartas.cz
|
155
141
|
executables: []
|
@@ -158,16 +144,11 @@ extra_rdoc_files:
|
|
158
144
|
- LICENSE.txt
|
159
145
|
- README.md
|
160
146
|
files:
|
161
|
-
- ".document"
|
162
147
|
- Changes.md
|
163
|
-
- Dockerfile
|
164
148
|
- Gemfile
|
165
149
|
- LICENSE.txt
|
166
150
|
- README.md
|
167
151
|
- Rakefile
|
168
|
-
- config.ru
|
169
|
-
- docker-compose.yml
|
170
|
-
- examples/web-cron-ui.png
|
171
152
|
- lib/sidekiq-cron.rb
|
172
153
|
- lib/sidekiq/cron.rb
|
173
154
|
- lib/sidekiq/cron/job.rb
|
@@ -175,15 +156,14 @@ files:
|
|
175
156
|
- lib/sidekiq/cron/locales/de.yml
|
176
157
|
- lib/sidekiq/cron/locales/en.yml
|
177
158
|
- lib/sidekiq/cron/locales/ja.yml
|
159
|
+
- lib/sidekiq/cron/locales/pt.yml
|
178
160
|
- lib/sidekiq/cron/locales/ru.yml
|
179
161
|
- lib/sidekiq/cron/locales/zh-CN.yml
|
180
162
|
- lib/sidekiq/cron/poller.rb
|
181
163
|
- lib/sidekiq/cron/support.rb
|
182
164
|
- lib/sidekiq/cron/version.rb
|
183
165
|
- lib/sidekiq/cron/views/cron.erb
|
184
|
-
- lib/sidekiq/cron/views/cron.slim
|
185
166
|
- lib/sidekiq/cron/views/cron_show.erb
|
186
|
-
- lib/sidekiq/cron/views/cron_show.slim
|
187
167
|
- lib/sidekiq/cron/web.rb
|
188
168
|
- lib/sidekiq/cron/web_extension.rb
|
189
169
|
- sidekiq-cron.gemspec
|
@@ -204,15 +184,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
204
184
|
requirements:
|
205
185
|
- - ">="
|
206
186
|
- !ruby/object:Gem::Version
|
207
|
-
version: '2.
|
187
|
+
version: '2.6'
|
208
188
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
209
189
|
requirements:
|
210
190
|
- - ">="
|
211
191
|
- !ruby/object:Gem::Version
|
212
192
|
version: '0'
|
213
193
|
requirements: []
|
214
|
-
rubygems_version: 3.
|
194
|
+
rubygems_version: 3.1.6
|
215
195
|
signing_key:
|
216
196
|
specification_version: 4
|
217
|
-
summary: Sidekiq
|
197
|
+
summary: Sidekiq-Cron helps to add repeated scheduled jobs
|
218
198
|
test_files: []
|
data/.document
DELETED
data/Dockerfile
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
FROM ruby:2.4
|
2
|
-
MAINTAINER Joao Serra <joaopfserra@gmail.com>
|
3
|
-
|
4
|
-
RUN apt-get update && \
|
5
|
-
apt-get install -y --force-yes \
|
6
|
-
curl \
|
7
|
-
git \
|
8
|
-
wget \
|
9
|
-
libpq-dev && \
|
10
|
-
apt-get autoremove -y --force-yes && \
|
11
|
-
apt-get clean && \
|
12
|
-
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
13
|
-
|
14
|
-
ENV DOCKERIZE_VERSION v0.2.0
|
15
|
-
RUN wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
|
16
|
-
&& tar -C /usr/local/bin -xzvf dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz
|
17
|
-
|
18
|
-
RUN gem install bundler
|
19
|
-
|
20
|
-
ENV APP_HOME /sidekiq-cron
|
21
|
-
RUN mkdir $APP_HOME
|
22
|
-
WORKDIR $APP_HOME
|
23
|
-
|
24
|
-
ADD Gemfile* $APP_HOME/
|
25
|
-
|
26
|
-
ENV BUNDLE_GEMFILE=$APP_HOME/Gemfile \
|
27
|
-
BUNDLE_JOBS=2 \
|
28
|
-
BUNDLE_PATH=/bundle
|
29
|
-
|
30
|
-
RUN bundle install
|
31
|
-
|
32
|
-
ADD . $APP_HOME
|
data/config.ru
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
require 'sidekiq'
|
2
|
-
|
3
|
-
Sidekiq.configure_client do |config|
|
4
|
-
config.redis = { :size => 1 }
|
5
|
-
end
|
6
|
-
|
7
|
-
require 'sidekiq/web'
|
8
|
-
|
9
|
-
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), 'lib'))
|
10
|
-
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
11
|
-
|
12
|
-
require 'sidekiq-cron'
|
13
|
-
|
14
|
-
run Sidekiq::Web
|