katalyst-healthcheck 0.4.1 → 0.5.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: 598b8c8ff9cd98a080eca3ec50b04b3b6e4ecd9cbf77d2db2b727264eaf724fc
4
- data.tar.gz: 1d9263a7f9ace6ecb1e85004152e67641b259cfcfdbd50c371b2969593a32a6e
3
+ metadata.gz: 98f3a6d7cdd552b27174c0995b965fb12873589a74b659d5171248ec5b083471
4
+ data.tar.gz: 5aa0dc18fc238ff3310021ee15c4f1a8f3aa9fc2f5e79ab71dafded896e9c10d
5
5
  SHA512:
6
- metadata.gz: 942c06bb7d5508509bf6682dd484ceb48b6e11bc6c0f9130372c88285c08bbae5f0ef7603a5ad2e7d37e1005265075b0b694ce55ac11fb7504ca81745ae8016d
7
- data.tar.gz: bcd5e63980bc900e04d5dccc5ad9c00a554b248fd0917dfeb054a6b20297288e35110414492fb96258a32290a803d3bfb6292f6bb5337a174cb4843b44e33327
6
+ metadata.gz: d6b73a20ff798cd6d640c554a9d075a6ead77c30fd36e0f32571913c232e03cb94c31f7154d79bd152f73aed3d5992eb726a6de8902732b46189c989adea9c4f
7
+ data.tar.gz: 06c78c60b051f2dea57aaba8201a3d1d0086a7d2168cb5613cbcd7c7b4a45b81a2eebac045883bd39e970a5750d41f8b490e61af0773086bdf82a3e973caa007
@@ -40,7 +40,8 @@ module Katalyst
40
40
  def initialize(options = {})
41
41
  options = { url: self.class.rails_redis_url }.merge(options) if defined?(Rails)
42
42
  options = DEFAULT_OPTIONS.merge(options)
43
- @options = Struct.new(:url, :cache_key).new(options[:url], options[:cache_key])
43
+ namespaced_cache_key = [ENV["RAILS_ENV"], options[:cache_key]].compact.join("_")
44
+ @options = Struct.new(:url, :cache_key).new(options[:url], namespaced_cache_key)
44
45
  end
45
46
 
46
47
  # @return [Array<Hash>] List of tasks attribute data
@@ -90,7 +91,7 @@ module Katalyst
90
91
  end
91
92
 
92
93
  def client
93
- @client ||= ::Redis.new(options.to_h)
94
+ @client ||= ::Redis.new(url: options.url)
94
95
  end
95
96
 
96
97
  def lock_manager
@@ -70,7 +70,7 @@ module Katalyst
70
70
  def next_time
71
71
  return nil if interval.nil?
72
72
 
73
- (last_time || created_at) + interval
73
+ (last_time || created_at) + interval.seconds
74
74
  end
75
75
 
76
76
  # Mark this task as healthy and save state
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Katalyst
4
4
  module Healthcheck
5
- VERSION = "0.4.1"
5
+ VERSION = "0.5.1"
6
6
  end
7
7
  end
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "active_support/all"
3
4
  require "redlock"
4
5
 
5
6
  require "katalyst/healthcheck/version"
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: katalyst-healthcheck
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Katalyst Interactive
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-10-14 00:00:00.000000000 Z
11
+ date: 2023-03-27 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: activesupport
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '3'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '3'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: redis
15
29
  requirement: !ruby/object:Gem::Requirement