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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d6d234893805d5dc55d0f0401cb4a953c7650f281823d172ef9406d5e24839b
|
4
|
+
data.tar.gz: 6c49a1093ebdc6ecbe04143e6b05224b67934eb4ba0cb1c0a0458af621e8c704
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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.
|
@@ -86,11 +86,13 @@ module Resque
|
|
86
86
|
end
|
87
87
|
|
88
88
|
def delete_old_jobs(job_count)
|
89
|
-
while
|
90
|
-
job_id
|
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(
|
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.
|
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-
|
11
|
+
date: 2020-06-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: resque
|