sidekiq-scheduler 4.0.1 → 4.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +17 -12
- data/README.md +7 -19
- data/lib/sidekiq-scheduler/scheduler.rb +6 -2
- data/lib/sidekiq-scheduler/version.rb +1 -1
- data/lib/sidekiq-scheduler.rb +18 -4
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46f14eafd933ccc91c36ba3b52babf250a9d17723d8a321b016bad2caaf36262
|
4
|
+
data.tar.gz: d285ce8992b380f98c05860883c54aa504c83df31aeba252297b1c02d35590a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fe3a692c9419fe21b60333f4801c519fa9eb96b2c49f4f7ad9f6bb41001ac8c0b9884ffa01c19018fe5101e2419f09af3df93f3efcd4de11b87b108d785a5047
|
7
|
+
data.tar.gz: 264780676f625a002b67b88eb03ee12981a2e222889334799e76c1aefde9ec3d35fad50d645233bd27c195113ea14e5af68ad3d82b4f853e7342f6ae2c3d08c3
|
data/CHANGELOG.md
CHANGED
@@ -1,20 +1,25 @@
|
|
1
|
+
# 4.0.2
|
2
|
+
|
3
|
+
- [**FIX**] Fix sidekiq deprecation warning when Sidekiq 6.5+ [#385](https://github.com/sidekiq-scheduler/sidekiq-scheduler/pull/385)
|
4
|
+
- [**FIX**] Fix `#print_schedule` calling a method that doesn't exist in rufus scheduler [#388](https://github.com/sidekiq-scheduler/sidekiq-scheduler/pull/388)
|
5
|
+
|
1
6
|
# 4.0.1
|
2
7
|
|
3
|
-
- [**FIX**] Add support for sidekiq 6.5 [#382](https://github.com/
|
8
|
+
- [**FIX**] Add support for sidekiq 6.5 [#382](https://github.com/sidekiq-scheduler/sidekiq-scheduler/pull/382)
|
4
9
|
|
5
10
|
# 4.0.0
|
6
11
|
|
7
|
-
- [**FIX**] Fix CSS not loading on Rails app when Sidekiq < 6 [#377](https://github.com/
|
8
|
-
- [**BREAKING CHANGE**] Drop support for Sidekiq 3 [f15e7ca1a5f3ab5b6fd3d7664d67723dba1fa1f1](https://github.com/
|
12
|
+
- [**FIX**] Fix CSS not loading on Rails app when Sidekiq < 6 [#377](https://github.com/sidekiq-scheduler/sidekiq-scheduler/pull/377)
|
13
|
+
- [**BREAKING CHANGE**] Drop support for Sidekiq 3 [f15e7ca1a5f3ab5b6fd3d7664d67723dba1fa1f1](https://github.com/sidekiq-scheduler/sidekiq-scheduler/commit/f15e7ca1a5f3ab5b6fd3d7664d67723dba1fa1f1)
|
9
14
|
|
10
15
|
# 4.0.0.alpha1
|
11
16
|
|
12
|
-
- [**FIX**] Fix deprecated uses of Redis#pipelined [#357](https://github.com/
|
13
|
-
- [**DOCS**] Add docs for running multi-sidekiq configurations [#362](https://github.com/
|
14
|
-
- [**FIX**] Prevent sidekiq_options from overriding ActiveJob queue settings [#367](https://github.com/
|
15
|
-
- [**ENHANCEMENT**] Highlight disabled jobs [#369](https://github.com/
|
16
|
-
- [**BREAKING CHANGE**] Require redis 4.2.0 [#370](https://github.com/
|
17
|
-
- [**FIX**] Fixes redis deprecation warning regarding `exists` [#370](https://github.com/
|
18
|
-
- [**BREAKING CHANGE**] Remove dependecy on thwait and e2mmap [#371](https://github.com/
|
19
|
-
- Support Ruby 3.1 [#373](https://github.com/
|
20
|
-
- [**BREAKING CHANGE**] Set rufus_scheduler_options via sidekiq.yml file as configuration option [#375](https://github.com/
|
17
|
+
- [**FIX**] Fix deprecated uses of Redis#pipelined [#357](https://github.com/sidekiq-scheduler/sidekiq-scheduler/pull/357)
|
18
|
+
- [**DOCS**] Add docs for running multi-sidekiq configurations [#362](https://github.com/sidekiq-scheduler/sidekiq-scheduler/pull/362)
|
19
|
+
- [**FIX**] Prevent sidekiq_options from overriding ActiveJob queue settings [#367](https://github.com/sidekiq-scheduler/sidekiq-scheduler/pull/367)
|
20
|
+
- [**ENHANCEMENT**] Highlight disabled jobs [#369](https://github.com/sidekiq-scheduler/sidekiq-scheduler/pull/369)
|
21
|
+
- [**BREAKING CHANGE**] Require redis 4.2.0 [#370](https://github.com/sidekiq-scheduler/sidekiq-scheduler/pull/370)
|
22
|
+
- [**FIX**] Fixes redis deprecation warning regarding `exists` [#370](https://github.com/sidekiq-scheduler/sidekiq-scheduler/pull/370)
|
23
|
+
- [**BREAKING CHANGE**] Remove dependecy on thwait and e2mmap [#371](https://github.com/sidekiq-scheduler/sidekiq-scheduler/pull/371)
|
24
|
+
- Support Ruby 3.1 [#373](https://github.com/sidekiq-scheduler/sidekiq-scheduler/pull/373)
|
25
|
+
- [**BREAKING CHANGE**] Set rufus_scheduler_options via sidekiq.yml file as configuration option [#375](https://github.com/sidekiq-scheduler/sidekiq-scheduler/pull/375)
|
data/README.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# sidekiq-scheduler
|
2
2
|
|
3
3
|
<p align="center">
|
4
|
-
<a href="http://
|
5
|
-
<img src="https://
|
4
|
+
<a href="http://sidekiq-scheduler.github.io/sidekiq-scheduler/">
|
5
|
+
<img src="https://sidekiq-scheduler.github.io/sidekiq-scheduler/images/small-logo.svg" width="468px" height="200px" alt="Sidekiq Scheduler" />
|
6
6
|
</a>
|
7
7
|
</p>
|
8
8
|
|
@@ -10,19 +10,7 @@
|
|
10
10
|
<a href="https://badge.fury.io/rb/sidekiq-scheduler">
|
11
11
|
<img src="https://badge.fury.io/rb/sidekiq-scheduler.svg" alt="Gem Version">
|
12
12
|
</a>
|
13
|
-
<a href="
|
14
|
-
<img src="https://codeclimate.com/github/moove-it/sidekiq-scheduler/badges/gpa.svg" alt="Code Climate">
|
15
|
-
</a>
|
16
|
-
<a href="https://travis-ci.org/moove-it/sidekiq-scheduler">
|
17
|
-
<img src="https://api.travis-ci.org/moove-it/sidekiq-scheduler.svg?branch=master" alt="Build Status">
|
18
|
-
</a>
|
19
|
-
<a href="https://coveralls.io/github/moove-it/sidekiq-scheduler?branch=master">
|
20
|
-
<img src="https://coveralls.io/repos/moove-it/sidekiq-scheduler/badge.svg?branch=master&service=github" alt="Coverage Status">
|
21
|
-
</a>
|
22
|
-
<a href="https://inch-ci.org/github/moove-it/sidekiq-scheduler">
|
23
|
-
<img src="https://inch-ci.org/github/moove-it/sidekiq-scheduler.svg?branch=master" alt="Documentation Coverage">
|
24
|
-
</a>
|
25
|
-
<a href="http://www.rubydoc.info/github/moove-it/sidekiq-scheduler">
|
13
|
+
<a href="http://www.rubydoc.info/github/sidekiq-scheduler/sidekiq-scheduler">
|
26
14
|
<img src="https://img.shields.io/badge/yard-docs-blue.svg" alt="Documentation">
|
27
15
|
</a>
|
28
16
|
</p>
|
@@ -30,7 +18,7 @@
|
|
30
18
|
`sidekiq-scheduler` is an extension to [Sidekiq](http://github.com/mperham/sidekiq) that
|
31
19
|
pushes jobs in a scheduled way, mimicking cron utility.
|
32
20
|
|
33
|
-
__Note:__ Current branch contains work of the
|
21
|
+
__Note:__ Current branch contains work of the v4 release, if you are looking for version 2.2.* or 3.*, go to [2.2-stable branch](https://github.com/sidekiq-scheduler/sidekiq-scheduler/tree/2.2-stable) / [v3-stable](https://github.com/sidekiq-scheduler/sidekiq-scheduler/tree/v3-stable).
|
34
22
|
|
35
23
|
## Installation
|
36
24
|
|
@@ -387,7 +375,7 @@ Scheduler** for the other processes not responsible for the schedule. If you
|
|
387
375
|
don't, the last booted Sidekiq processes' schedule will be what is stored in
|
388
376
|
Redis.
|
389
377
|
|
390
|
-
See https://github.com/
|
378
|
+
See https://github.com/sidekiq-scheduler/sidekiq-scheduler/issues/361 for a more details.
|
391
379
|
|
392
380
|
## Sidekiq Web Integration
|
393
381
|
|
@@ -402,7 +390,7 @@ require 'sidekiq-scheduler/web'
|
|
402
390
|
run Sidekiq::Web
|
403
391
|
```
|
404
392
|
|
405
|
-
![Sidekiq Web Integration](https://github.com/
|
393
|
+
![Sidekiq Web Integration](https://github.com/sidekiq-scheduler/sidekiq-scheduler/raw/master/images/recurring-jobs-ui-tab.png)
|
406
394
|
|
407
395
|
## ActiveJob integration
|
408
396
|
|
@@ -426,7 +414,7 @@ To see your updated schedule, be sure to reload Spring by stopping it prior to b
|
|
426
414
|
|
427
415
|
Run `spring stop` to stop Spring.
|
428
416
|
|
429
|
-
For more information, see [this issue](https://github.com/
|
417
|
+
For more information, see [this issue](https://github.com/sidekiq-scheduler/sidekiq-scheduler/issues/35#issuecomment-48067183) and [Spring's README](https://github.com/rails/spring/blob/master/README.md).
|
430
418
|
|
431
419
|
|
432
420
|
## Manage tasks from Unicorn/Rails server
|
@@ -57,7 +57,7 @@ module SidekiqScheduler
|
|
57
57
|
def print_schedule
|
58
58
|
if rufus_scheduler
|
59
59
|
Sidekiq.logger.info "Scheduling Info\tLast Run"
|
60
|
-
scheduler_jobs = rufus_scheduler.
|
60
|
+
scheduler_jobs = rufus_scheduler.jobs
|
61
61
|
scheduler_jobs.each_value do |v|
|
62
62
|
Sidekiq.logger.info "#{v.t}\t#{v.last}\t"
|
63
63
|
end
|
@@ -284,7 +284,11 @@ module SidekiqScheduler
|
|
284
284
|
end
|
285
285
|
|
286
286
|
def sidekiq_queues
|
287
|
-
|
287
|
+
if SIDEKIQ_GTE_6_5_0
|
288
|
+
Sidekiq[:queues].map(&:to_s)
|
289
|
+
else
|
290
|
+
Sidekiq.options[:queues].map(&:to_s)
|
291
|
+
end
|
288
292
|
end
|
289
293
|
|
290
294
|
# Returns true if a job's queue is included in the array of queues
|
data/lib/sidekiq-scheduler.rb
CHANGED
@@ -7,19 +7,33 @@ require_relative 'sidekiq-scheduler/manager'
|
|
7
7
|
require_relative 'sidekiq-scheduler/redis_manager'
|
8
8
|
require_relative 'sidekiq-scheduler/extensions/schedule'
|
9
9
|
|
10
|
+
SIDEKIQ_GTE_6_5_0 = Gem::Version.new(Sidekiq::VERSION) >= Gem::Version.new('6.5.0')
|
11
|
+
|
10
12
|
Sidekiq.configure_server do |config|
|
11
13
|
|
12
14
|
config.on(:startup) do
|
13
15
|
# schedules_changed's type was changed from SET to ZSET, so we remove old versions at startup
|
14
16
|
SidekiqScheduler::RedisManager.clean_schedules_changed
|
15
17
|
|
16
|
-
|
17
|
-
config.options
|
18
|
-
|
18
|
+
# Accessing the raw @config hash through .options is deprecated in 6.5 and to be removed in 7.0
|
19
|
+
config_options = SIDEKIQ_GTE_6_5_0 ? Sidekiq.instance_variable_get(:@config) : config.options
|
20
|
+
|
21
|
+
schedule_manager = SidekiqScheduler::Manager.new(config_options)
|
22
|
+
if SIDEKIQ_GTE_6_5_0
|
23
|
+
config[:schedule_manager] = schedule_manager
|
24
|
+
config[:schedule_manager].start
|
25
|
+
else
|
26
|
+
config.options[:schedule_manager] = schedule_manager
|
27
|
+
config.options[:schedule_manager].start
|
28
|
+
end
|
19
29
|
end
|
20
30
|
|
21
31
|
config.on(:quiet) do
|
22
|
-
|
32
|
+
if SIDEKIQ_GTE_6_5_0
|
33
|
+
config[:schedule_manager].stop
|
34
|
+
else
|
35
|
+
config.options[:schedule_manager].stop
|
36
|
+
end
|
23
37
|
end
|
24
38
|
|
25
39
|
end
|
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: 4.0.
|
4
|
+
version: 4.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Morton Jonuschat
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2022-06-
|
13
|
+
date: 2022-06-27 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: sidekiq
|
@@ -249,7 +249,7 @@ files:
|
|
249
249
|
- web/locales/sv.yml
|
250
250
|
- web/locales/zh-cn.yml
|
251
251
|
- web/views/recurring_jobs.erb
|
252
|
-
homepage: https://
|
252
|
+
homepage: https://sidekiq-scheduler.github.io/sidekiq-scheduler/
|
253
253
|
licenses:
|
254
254
|
- MIT
|
255
255
|
metadata: {}
|