mini_scheduler 0.9.0 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bf8e76b54130cca4fcd19911dd1b5a9a555c9d4eb082831a3232e8545e4a4fca
4
- data.tar.gz: b5ae3324219df3967402751423ea3eac9639a111dc121a84acbd5dfdced0bd88
3
+ metadata.gz: cf31f75f3715066ce088fa79dcae78b0b85b81361646949d516ded4bc5a49771
4
+ data.tar.gz: 92f732c04768b250ddd6c1511645f7c17b2dda7c118f3df6a8fdb1a439efb643
5
5
  SHA512:
6
- metadata.gz: f4c366bd7d125b5d8e8ae267ddeff8eb4499fb86500ca3c6e69984b1659948c730cf859ef69565067ba9e88f0aec2a1c070bdd3477a32de7c95501628312da21
7
- data.tar.gz: 1d218ff79a0ae03bc46b3af397e074cc1c9198249676c1364d10b2b690cb0a33d74d49f043cdbb8686494a8b91ed402dd4fbe33e921df0a3bdb9b7012d5c0390
6
+ metadata.gz: ddbb5aa212b209bd283cac5ed519de2576e29327e9ce709629bcc9e655976af97b62688d2bc0cad05fa8357864c6f51313d9e893134dd9ae4d136a8113870d90
7
+ data.tar.gz: 43e1c9b1207bd39b7bea5d3fa2bec58bc7be7f1bea4cd19c96c07cc81bb5fd8e55fce938b18bd3adc459e53ca5cbff34d5cafbddd2e2bc85afb053abc678b574
data/CHANGELOG.md ADDED
@@ -0,0 +1,4 @@
1
+ # 0.9.1 - 21/01/2019
2
+
3
+ - Remove dependency on ActiveSupport and add proper dependency for Sidekiq
4
+ - Remove Discourse specific bits from Sidekiq web scheduler tab.
@@ -10,7 +10,8 @@ module MiniScheduler
10
10
  @manager = manager
11
11
  @reschedule_orphans_thread = Thread.new do
12
12
  while !@stopped
13
- sleep 1.minute
13
+ sleep 60
14
+
14
15
  @mutex.synchronize do
15
16
  reschedule_orphans
16
17
  end
@@ -33,7 +33,7 @@ module MiniScheduler
33
33
  # this happens automatically after if fire by the manager.
34
34
  def valid?
35
35
  return false unless @next_run
36
- (!@prev_run && @next_run < Time.now.to_i + 5.minutes) || valid_every? || valid_daily?
36
+ (!@prev_run && @next_run < Time.now.to_i + 300) || valid_every? || valid_daily?
37
37
  end
38
38
 
39
39
  def valid_every?
@@ -59,7 +59,7 @@ module MiniScheduler
59
59
  end
60
60
 
61
61
  if !valid?
62
- @next_run = Time.now.to_i + 5.minutes * Random.rand
62
+ @next_run = Time.now.to_i + 300 * Random.rand
63
63
  end
64
64
  end
65
65
 
@@ -1,3 +1,3 @@
1
1
  module MiniScheduler
2
- VERSION = "0.9.0"
2
+ VERSION = "0.9.1"
3
3
  end
@@ -1,11 +1,4 @@
1
1
  <header class="row">
2
- <% if Sidekiq.respond_to?(:paused?) && Sidekiq.paused? %>
3
- <div class="col-sm-12">
4
- <div class="alert alert-danger text-center">
5
- <h2>SIDEKIQ IS PAUSED!</h2>
6
- </div>
7
- </div>
8
- <% end %>
9
2
  <div class="col-sm-12">
10
3
  <h3>Recurring Jobs <a style='font-size:50%; margin-left: 30px' href='scheduler/history'>history</a></h3>
11
4
  </div>
@@ -3,7 +3,6 @@ require 'mini_scheduler/schedule'
3
3
  require 'mini_scheduler/schedule_info'
4
4
  require 'mini_scheduler/manager'
5
5
  require 'mini_scheduler/distributed_mutex'
6
-
7
6
  require 'sidekiq/exception_handler'
8
7
 
9
8
  module MiniScheduler
@@ -22,10 +22,11 @@ Gem::Specification.new do |spec|
22
22
  end
23
23
  spec.require_paths = ["lib"]
24
24
 
25
+ spec.add_dependency "sidekiq"
26
+
25
27
  spec.add_development_dependency "pg", ">= 1.0"
26
28
  spec.add_development_dependency "activesupport", ">= 5.2"
27
29
  spec.add_development_dependency "rspec"
28
30
  spec.add_development_dependency "mocha"
29
31
  spec.add_development_dependency "mock_redis"
30
- spec.add_development_dependency "sidekiq"
31
32
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mini_scheduler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Saffron
@@ -9,52 +9,52 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-01-18 00:00:00.000000000 Z
12
+ date: 2019-01-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- name: pg
15
+ name: sidekiq
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
18
  - - ">="
19
19
  - !ruby/object:Gem::Version
20
- version: '1.0'
21
- type: :development
20
+ version: '0'
21
+ type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - ">="
26
26
  - !ruby/object:Gem::Version
27
- version: '1.0'
27
+ version: '0'
28
28
  - !ruby/object:Gem::Dependency
29
- name: activesupport
29
+ name: pg
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
32
  - - ">="
33
33
  - !ruby/object:Gem::Version
34
- version: '5.2'
34
+ version: '1.0'
35
35
  type: :development
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
39
  - - ">="
40
40
  - !ruby/object:Gem::Version
41
- version: '5.2'
41
+ version: '1.0'
42
42
  - !ruby/object:Gem::Dependency
43
- name: rspec
43
+ name: activesupport
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
46
  - - ">="
47
47
  - !ruby/object:Gem::Version
48
- version: '0'
48
+ version: '5.2'
49
49
  type: :development
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
53
  - - ">="
54
54
  - !ruby/object:Gem::Version
55
- version: '0'
55
+ version: '5.2'
56
56
  - !ruby/object:Gem::Dependency
57
- name: mocha
57
+ name: rspec
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
60
  - - ">="
@@ -68,7 +68,7 @@ dependencies:
68
68
  - !ruby/object:Gem::Version
69
69
  version: '0'
70
70
  - !ruby/object:Gem::Dependency
71
- name: mock_redis
71
+ name: mocha
72
72
  requirement: !ruby/object:Gem::Requirement
73
73
  requirements:
74
74
  - - ">="
@@ -82,7 +82,7 @@ dependencies:
82
82
  - !ruby/object:Gem::Version
83
83
  version: '0'
84
84
  - !ruby/object:Gem::Dependency
85
- name: sidekiq
85
+ name: mock_redis
86
86
  requirement: !ruby/object:Gem::Requirement
87
87
  requirements:
88
88
  - - ">="
@@ -105,6 +105,7 @@ files:
105
105
  - ".gitignore"
106
106
  - ".rspec"
107
107
  - ".rubocop.yml"
108
+ - CHANGELOG.md
108
109
  - Gemfile
109
110
  - README.md
110
111
  - app/models/mini_scheduler/stat.rb