expire_job 0.1.4 → 0.1.5.pre

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: ded194b049dfc5f7825d362ba9098caa3b326876164e6987e724a8ff41c69d48
4
- data.tar.gz: 9928e46a81c1182f57d97badfad6e7ed1adbd1abd5c2f2ae3153d73586f4735e
3
+ metadata.gz: 6cd4280df350274047708624ad5812400717319341158460546cdd4fb1c845b9
4
+ data.tar.gz: c7cdb5c9bbe09147807dc7481836d3134768b1457de530338abb6045c881e553
5
5
  SHA512:
6
- metadata.gz: 1a6ed77717bac840cf4f49ad121e7292d5dcbf9bbfb28b64c8c8a08db7290cb80aa31c6ca08d68d17b5587c86de0e932a6035ac79f728761dbecea76684b7635
7
- data.tar.gz: 1937c7ff2648c61ead1852bac3e5de6b40df67931ab3af5008dfbffbc04dc26640323f969ad82771a2fcf7adf2969f1ca91f25b8fc43659824c2ec62382c74a5
6
+ metadata.gz: f08c98b24108f33a8c627adf1077c26c24c5044512390c835d81b893a7d1f279f5445ce3358e3f1b2b91514e279b9b2165fcf4c2cca4ad8312afda9cb3238150
7
+ data.tar.gz: da05770d923b3f89b1e59e41ac00a50eb3ace1ee1b949dc7a5b9149ca69594070397ae8a240586dc0cd0fca555e372a99404080b56f7d13120285d78364e1ea3
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.7.4
data/Gemfile.lock CHANGED
@@ -1,24 +1,21 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- expire_job (0.1.4)
4
+ expire_job (0.1.5.pre)
5
5
  sidekiq (> 6.0, < 7.0)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- connection_pool (2.2.2)
11
- minitest (5.11.3)
12
- rack (2.2.2)
13
- rack-protection (2.0.8.1)
14
- rack
15
- rake (12.3.2)
16
- redis (4.1.4)
17
- sidekiq (6.0.7)
10
+ connection_pool (2.2.5)
11
+ minitest (5.14.2)
12
+ rack (2.2.3)
13
+ rake (12.3.3)
14
+ redis (4.5.1)
15
+ sidekiq (6.3.1)
18
16
  connection_pool (>= 2.2.2)
19
17
  rack (~> 2.0)
20
- rack-protection (>= 2.0.0)
21
- redis (>= 4.1.0)
18
+ redis (>= 4.2.0)
22
19
 
23
20
  PLATFORMS
24
21
  ruby
@@ -1,3 +1,3 @@
1
1
  module ExpireJob
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5.pre"
3
3
  end
data/lib/expire_job.rb CHANGED
@@ -13,7 +13,7 @@ module ExpireJob
13
13
  if perform_expire_check(worker.expire_in, parsed_time)
14
14
  yield
15
15
  else
16
- logger.info { "Expired job is skipped. args=#{truncate(msg['args'].inspect)}" }
16
+ logger.info { "[ExpireJob] Expired job is skipped. args=#{truncate(msg['args'].inspect)}" }
17
17
  perform_callback(worker, :after_expire, msg['args'])
18
18
  nil
19
19
  end
@@ -24,7 +24,7 @@ module ExpireJob
24
24
 
25
25
  def perform_expire_check(expire_in, enqueued_at)
26
26
  if enqueued_at.nil?
27
- logger.warn { "Can not expire this job because enqueued_at is nil." }
27
+ logger.warn { "[ExpireJob] Can not expire this job because enqueued_at is nil." }
28
28
  return true
29
29
  end
30
30
 
@@ -41,7 +41,7 @@ module ExpireJob
41
41
 
42
42
  if args.is_a?(Array) && args.size >= 1 && args.last.is_a?(Hash)
43
43
  enqueued_at = args.last['enqueued_at']
44
- logger.info { "enqueued_at was found in args. enqueued_at=#{enqueued_at}" } if enqueued_at
44
+ logger.info { "[ExpireJob] enqueued_at was found in args. enqueued_at=#{enqueued_at}" } if enqueued_at
45
45
  end
46
46
 
47
47
  if enqueued_at.nil?
@@ -49,7 +49,7 @@ module ExpireJob
49
49
  # created_at: is a time when #perform_async or #perform_in is called
50
50
  # enqueued_at: is a time when the job is inserted into a queue
51
51
  enqueued_at = msg['created_at'] # TODO Use enqueued_at?
52
- logger.debug { "enqueued_at was found in msg. enqueued_at=#{enqueued_at}" } if enqueued_at
52
+ logger.debug { "[ExpireJob] enqueued_at was found in msg. enqueued_at=#{enqueued_at}" } if enqueued_at
53
53
  end
54
54
 
55
55
  enqueued_at
@@ -62,7 +62,7 @@ module ExpireJob
62
62
  Time.parse(value)
63
63
  end
64
64
  rescue => e
65
- logger.warn { "Can not parse this value. value=#{value.inspect}" }
65
+ logger.warn { "[ExpireJob] Can not parse this value. value=#{value.inspect}" }
66
66
  nil
67
67
  end
68
68
 
@@ -77,8 +77,7 @@ module ExpireJob
77
77
  worker.send(callback_name, *args)
78
78
  end
79
79
  rescue ArgumentError => e
80
- message = "The number of parameters of the callback method (#{parameters.size}) is not the same as the number of arguments (#{args.size})"
81
- raise ArgumentError.new("#{self.class}:#{worker.class} #{message} callback_name=#{callback_name} args=#{args.inspect} parameters=#{parameters.inspect}")
80
+ raise ArgumentError.new("[ExpireJob] Invalid parameters callback_name=#{callback_name}")
82
81
  end
83
82
  end
84
83
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: expire_job
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - ts-3156
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-05-25 00:00:00.000000000 Z
11
+ date: 2021-11-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sidekiq
@@ -39,6 +39,7 @@ extra_rdoc_files: []
39
39
  files:
40
40
  - ".gitignore"
41
41
  - ".rakeTasks"
42
+ - ".ruby-version"
42
43
  - ".travis.yml"
43
44
  - CODE_OF_CONDUCT.md
44
45
  - Gemfile
@@ -69,12 +70,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
69
70
  version: 2.3.0
70
71
  required_rubygems_version: !ruby/object:Gem::Requirement
71
72
  requirements:
72
- - - ">="
73
+ - - ">"
73
74
  - !ruby/object:Gem::Version
74
- version: '0'
75
+ version: 1.3.1
75
76
  requirements: []
76
- rubyforge_project:
77
- rubygems_version: 2.7.6
77
+ rubygems_version: 3.1.6
78
78
  signing_key:
79
79
  specification_version: 4
80
80
  summary: Set an expiry to Sidekiq jobs