sidekiq-scheduler 3.0.1 → 3.1.0

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: 6a5dc23147c3734bd7b7a0e4807c6dcf6ed445bf556fbfd8a467f00995df3464
4
- data.tar.gz: a4cb767f222114219389a01741a6fb9f62f6b9bc5a1621eb6e6da653c2e0c179
3
+ metadata.gz: 7c9e10cdd3a2bfc144f07860038c95ef459bb2bf8800d763ea90379b6c709472
4
+ data.tar.gz: 8f4be75200f8a5c44f53227ba73586e5e6ac9e8885972163382b372372086af0
5
5
  SHA512:
6
- metadata.gz: 5b0e12484ddb14ba56b003176a664815982529823068753a32cadb8a19eb6b7eb6b6b15ce439ffef8186f02f259b444cab253dc1e0e2bad20deaed1325def388
7
- data.tar.gz: 3fe2d0ca59b5eaf22898082cb287daec90b89a9f63364419a9c07b1359f5f748ce90ce81cd2806d4083e672e9cc546e90b8a07d289cc15b6107149c73c459447
6
+ metadata.gz: e8dc47d6600676d0de6cac9b508026315c2eefcf6a055b496abd84ed663ec9bb9eddc267246ba877588ec4abb67d79a773664238d1028e23ca2859869e76dedd
7
+ data.tar.gz: 78764a88d67d2c501a4df10a8d7b79331146912a4d5fa2c83a04e1b06165bd45ceec0a11232e8e841fc452d6fd79e985142ad72a945e4fc04a8d79aa7090f79c
data/README.md CHANGED
@@ -272,8 +272,9 @@ Sidekiq.get_schedule
272
272
 
273
273
  ## Time zones
274
274
 
275
- Note that if you use the cron syntax, this will be interpreted as in the server time zone
276
- rather than the `config.time_zone` specified in Rails.
275
+ Note that if you use the cron syntax and are not running a Rails app, this will be interpreted in the server time zone.
276
+
277
+ In a Rails app, [rufus-scheduler](https://github.com/jmettraux/rufus-scheduler) (>= 3.3.3) will use the `config.time_zone` specified in Rails.
277
278
 
278
279
  You can explicitly specify the time zone that rufus-scheduler will use:
279
280
 
@@ -96,7 +96,13 @@ module SidekiqScheduler
96
96
  #
97
97
  # @return [Boolean] true if the schedules key is set, false otherwise
98
98
  def self.schedule_exist?
99
- Sidekiq.redis { |r| r.exists(:schedules) }
99
+ Sidekiq.redis do |r|
100
+ if r.respond_to?(:exists?)
101
+ r.exists?(:schedules)
102
+ else
103
+ !!r.exists(:schedules)
104
+ end
105
+ end
100
106
  end
101
107
 
102
108
  # Returns all the schedule changes for a given time range.
@@ -2,7 +2,6 @@ require 'rufus/scheduler'
2
2
  require 'thwait'
3
3
  require 'sidekiq/util'
4
4
  require 'json'
5
- require 'sidekiq-scheduler/manager'
6
5
  require 'sidekiq-scheduler/rufus_utils'
7
6
  require 'sidekiq-scheduler/redis_manager'
8
7
 
@@ -1,5 +1,5 @@
1
1
  module SidekiqScheduler
2
2
 
3
- VERSION = '3.0.1'
3
+ VERSION = '3.1.0'
4
4
 
5
5
  end
@@ -34,10 +34,10 @@
34
34
  </span>
35
35
  </td>
36
36
  <td class="text-center">
37
- <a class="btn btn-warn btn-xs" href="<%= root_path %>recurring-jobs/<%= URI.escape(job.name) %>/enqueue">
37
+ <a class="btn btn-warn btn-xs" href="<%= root_path %>recurring-jobs/<%= ERB::Util.url_encode(job.name) %>/enqueue">
38
38
  <%= t('enqueue_now') %>
39
39
  </a>
40
- <a class="btn <%= job.enabled? ? "btn-primary" : "btn-warn"%> btn-xs" href="<%= root_path %>recurring-jobs/<%= URI.escape(job.name) %>/toggle">
40
+ <a class="btn <%= job.enabled? ? "btn-primary" : "btn-warn"%> btn-xs" href="<%= root_path %>recurring-jobs/<%= ERB::Util.url_encode(job.name) %>/toggle">
41
41
  <%= job.enabled? ? t('disable') : t('enable') %>
42
42
  </a>
43
43
  </td>
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq-scheduler
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
4
+ version: 3.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Morton Jonuschat
8
8
  - Moove-it
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-02-03 00:00:00.000000000 Z
12
+ date: 2021-05-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sidekiq
@@ -297,7 +297,7 @@ homepage: https://moove-it.github.io/sidekiq-scheduler/
297
297
  licenses:
298
298
  - MIT
299
299
  metadata: {}
300
- post_install_message:
300
+ post_install_message:
301
301
  rdoc_options: []
302
302
  require_paths:
303
303
  - lib
@@ -312,8 +312,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
312
312
  - !ruby/object:Gem::Version
313
313
  version: '0'
314
314
  requirements: []
315
- rubygems_version: 3.1.2
316
- signing_key:
315
+ rubygems_version: 3.2.18
316
+ signing_key:
317
317
  specification_version: 4
318
318
  summary: Light weight job scheduling extension for Sidekiq
319
319
  test_files: []