sidekiq-scheduler 3.0.0 → 3.0.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
- SHA1:
3
- metadata.gz: 9baa032bdb214ffc3f0d229c0a5181f36a8be200
4
- data.tar.gz: 011c8eaf157ceea568cc64ba125af2c7cc0706db
2
+ SHA256:
3
+ metadata.gz: 6a5dc23147c3734bd7b7a0e4807c6dcf6ed445bf556fbfd8a467f00995df3464
4
+ data.tar.gz: a4cb767f222114219389a01741a6fb9f62f6b9bc5a1621eb6e6da653c2e0c179
5
5
  SHA512:
6
- metadata.gz: 7c2f4d826b83179acee13b422dfb4ab00542b747b17d4f30685d675e8938d1b4b8b06d362a348590a9363b65d4acbb3711c0577db4b1ab6f5d5a0cac32d44b97
7
- data.tar.gz: db0db5b8556f897a50800856031102e3f2001d8bf4658e9daabd8b41a269da92d475b37f5f01026539c435433636cb441cc3123c7fe292091b43c7c5ff04a232
6
+ metadata.gz: 5b0e12484ddb14ba56b003176a664815982529823068753a32cadb8a19eb6b7eb6b6b15ce439ffef8186f02f259b444cab253dc1e0e2bad20deaed1325def388
7
+ data.tar.gz: 3fe2d0ca59b5eaf22898082cb287daec90b89a9f63364419a9c07b1359f5f748ce90ce81cd2806d4083e672e9cc546e90b8a07d289cc15b6107149c73c459447
data/README.md CHANGED
@@ -182,6 +182,8 @@ Cron, every, and interval types push jobs into sidekiq in a recurrent manner.
182
182
  `interval` is similar to `every`, the difference between them is that `interval` type schedules the
183
183
  next execution after the interval has elapsed counting from its last job enqueue.
184
184
 
185
+ Note that `every` and `interval` count from when the Sidekiq process (re)starts. So `every: '48h'` will never run if the Sidekiq process is restarted daily, for example. You can do `every: ['48h', first_in: '0s']` to make the job run immediately after a restart, and then have the worker check when it was last run.
186
+
185
187
  At, and in types push jobs only once. `at` schedules in a point in time:
186
188
  ``` yaml
187
189
  at: '3001/01/01'
@@ -296,7 +298,7 @@ That's a minimum of `concurrency` + 5 (per the [Sidekiq wiki](https://github.com
296
298
  You can also override the thread pool size in Rufus Scheduler by setting e.g.:
297
299
 
298
300
  ```
299
- Sidekiq::Scheduler.rufus_scheduler_options = { max_work_threads: 5 }
301
+ SidekiqScheduler::Scheduler.instance.rufus_scheduler_options = { max_work_threads: 5 }
300
302
  ```
301
303
 
302
304
  ## Notes about running on Multiple Hosts
@@ -18,7 +18,7 @@ Sidekiq.configure_server do |config|
18
18
  config.options[:schedule_manager].start
19
19
  end
20
20
 
21
- config.on(:shutdown) do
21
+ config.on(:quiet) do
22
22
  config.options[:schedule_manager].stop
23
23
  end
24
24
 
@@ -66,7 +66,7 @@ module SidekiqScheduler
66
66
  def self.build_collection(schedule_hash)
67
67
  schedule_hash ||= {}
68
68
 
69
- schedule_hash.map do |name, job_spec|
69
+ schedule_hash.sort.map do |name, job_spec|
70
70
  new(name, job_spec)
71
71
  end
72
72
  end
@@ -82,7 +82,6 @@ module SidekiqScheduler
82
82
 
83
83
  Sidekiq.logger.info 'Schedule empty! Set Sidekiq.schedule' if Sidekiq.schedule.empty?
84
84
 
85
-
86
85
  @scheduled_jobs = {}
87
86
  queues = sidekiq_queues
88
87
 
@@ -187,9 +186,13 @@ module SidekiqScheduler
187
186
  #
188
187
  # @param [Symbol] stop_option The option to be passed to Rufus::Scheduler#stop
189
188
  def clear_schedule!(stop_option = :wait)
190
- rufus_scheduler.stop(stop_option)
191
- @rufus_scheduler = nil
189
+ if @rufus_scheduler
190
+ @rufus_scheduler.stop(stop_option)
191
+ @rufus_scheduler = nil
192
+ end
193
+
192
194
  @@scheduled_jobs = {}
195
+
193
196
  rufus_scheduler
194
197
  end
195
198
 
@@ -1,5 +1,5 @@
1
1
  module SidekiqScheduler
2
2
 
3
- VERSION = '3.0.0'
3
+ VERSION = '3.0.1'
4
4
 
5
5
  end
@@ -0,0 +1,14 @@
1
+ ja:
2
+ recurring_jobs: 定期ジョブ
3
+ name: 名前
4
+ description: 説明
5
+ interval: インターバル
6
+ class: クラス
7
+ queue: キュー
8
+ arguments: 引数
9
+ enqueue_now: すぐにエンキュー
10
+ last_time: 前回
11
+ next_time: 次回
12
+ no_next_time: このジョブの次の実行はありません
13
+ disable: 無効
14
+ enable: 有効
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq-scheduler
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Morton Jonuschat
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-06-04 00:00:00.000000000 Z
12
+ date: 2020-02-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sidekiq
@@ -73,6 +73,34 @@ dependencies:
73
73
  - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: 1.4.0
76
+ - !ruby/object:Gem::Dependency
77
+ name: thwait
78
+ requirement: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ type: :runtime
84
+ prerelease: false
85
+ version_requirements: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ - !ruby/object:Gem::Dependency
91
+ name: e2mmap
92
+ requirement: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ type: :runtime
98
+ prerelease: false
99
+ version_requirements: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
76
104
  - !ruby/object:Gem::Dependency
77
105
  name: rake
78
106
  requirement: !ruby/object:Gem::Requirement
@@ -135,14 +163,14 @@ dependencies:
135
163
  requirements:
136
164
  - - "~>"
137
165
  - !ruby/object:Gem::Version
138
- version: '0'
166
+ version: 0.19.0
139
167
  type: :development
140
168
  prerelease: false
141
169
  version_requirements: !ruby/object:Gem::Requirement
142
170
  requirements:
143
171
  - - "~>"
144
172
  - !ruby/object:Gem::Version
145
- version: '0'
173
+ version: 0.19.0
146
174
  - !ruby/object:Gem::Dependency
147
175
  name: simplecov
148
176
  requirement: !ruby/object:Gem::Requirement
@@ -257,6 +285,7 @@ files:
257
285
  - web/locales/es.yml
258
286
  - web/locales/fr.yml
259
287
  - web/locales/it.yml
288
+ - web/locales/ja.yml
260
289
  - web/locales/nl.yml
261
290
  - web/locales/pl.yml
262
291
  - web/locales/pt-BR.yml
@@ -283,8 +312,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
283
312
  - !ruby/object:Gem::Version
284
313
  version: '0'
285
314
  requirements: []
286
- rubyforge_project:
287
- rubygems_version: 2.6.11
315
+ rubygems_version: 3.1.2
288
316
  signing_key:
289
317
  specification_version: 4
290
318
  summary: Light weight job scheduling extension for Sidekiq