resque-job_history 0.0.17 → 0.0.18

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: b43c1dc7fc2ffd02571c60c0f50d4e7426bfd182e44dda1bb76175c2178b0606
4
- data.tar.gz: 84edfdefea39d88c6ef623587d72ed0c97bf51b712d232e193cfe64c07da6766
3
+ metadata.gz: 3d6d234893805d5dc55d0f0401cb4a953c7650f281823d172ef9406d5e24839b
4
+ data.tar.gz: 6c49a1093ebdc6ecbe04143e6b05224b67934eb4ba0cb1c0a0458af621e8c704
5
5
  SHA512:
6
- metadata.gz: a2cf03c484c94b3a3fbe3374bde9e9d159f859a2959962b2a280c0c3d2d1746a30d4eda389f6e75c9001513dbe9d5bcc01240791cc5b023265a8d8863c61b2ba
7
- data.tar.gz: e5077bab52fadd868706ceaa9fc766a57abc73a241627fb1be0537434b11192caf7e1cb97f14d2192a98063f57736b78d94cfaa9825238ba95741cbb8df44e40
6
+ metadata.gz: 9b2dd615e2f827800550bd709b4d5dcecbf6cc8df3a3fab854cb76e43da02de701419d854ba91697eee0d5b0ee5c009a903ac55610f06d077df89fbdfebc0e32
7
+ data.tar.gz: dca26cba1bfee9f7454bed17984f03e2799bfc6f01ad699e13704b44672cd8b9ebd7444f9f564d6058823037d40f74d89c691deadd1f3487dc6a71b2c4f94744
@@ -10,7 +10,7 @@ module Resque
10
10
  module JobHistory
11
11
  extend ActiveSupport::Concern
12
12
 
13
- # Redis mapp:
13
+ # Redis map:
14
14
  # job_history - a set of all of the class names of all jobs
15
15
  # job_history..linear_jobs - a list of the IDs for all jobs that have run in the order
16
16
  # they were started.
@@ -48,6 +48,8 @@ module Resque
48
48
  purge_class class_name
49
49
  end
50
50
 
51
+ purge_linear_history
52
+
51
53
  del_key(Resque::Plugins::JobHistory::HistoryDetails.job_history_key, "Purging job_history_key")
52
54
 
53
55
  redis.keys("*").each do |key|
@@ -86,11 +86,13 @@ module Resque
86
86
  end
87
87
 
88
88
  def delete_old_jobs(job_count)
89
- while job_count > max_jobs
90
- job_id = redis.rpop(job_list_key)
89
+ while num_jobs > max_jobs
90
+ job_id = redis.rpop(job_list_key)
91
+ job_class_name = job_class(job_id)
92
+
91
93
  remove_job_data(job_id)
92
94
 
93
- Resque::Plugins::JobHistory::Job.new(job_class(job_id), job_id).safe_purge
95
+ Resque::Plugins::JobHistory::Job.new(job_class_name, job_id).safe_purge
94
96
 
95
97
  job_count -= 1
96
98
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: resque-job_history
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.17
4
+ version: 0.0.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - RealNobody
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-16 00:00:00.000000000 Z
11
+ date: 2020-06-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: resque