workerholic 0.0.11 → 0.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/workerholic/statistics_api.rb +5 -5
- data/lib/workerholic/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7b98871838679acc6239c6628afb933615f0b795
|
4
|
+
data.tar.gz: de60e003b30f1713cee13400f20c64711b7c668e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b438d5c6d6e512475f73d1d13e6678072f35af6f90f7c76d0cee71f4b5f7b3e4735502235afbb05ce7297ff13a879ff5759c4ea37a7e2180fd53015918f4f02
|
7
|
+
data.tar.gz: 474649407c346bf5bbe491292b2e5122e365bbb023892a0ec49404ce24953368c848197237c4e579169c4a22c2babc264ab8133f18200f2308244bec0d33c43f
|
@@ -38,15 +38,15 @@ module Workerholic
|
|
38
38
|
|
39
39
|
private
|
40
40
|
|
41
|
-
def storage
|
41
|
+
def self.storage
|
42
42
|
@storage ||= Storage::RedisWrapper.new
|
43
43
|
end
|
44
44
|
|
45
|
-
def logger(message)
|
45
|
+
def self.logger(message)
|
46
46
|
@log ||= LogManager.new
|
47
47
|
end
|
48
48
|
|
49
|
-
def parse_job_classes(job_classes, count_only = true)
|
49
|
+
def self.parse_job_classes(job_classes, count_only = true)
|
50
50
|
job_classes.map do |job_class|
|
51
51
|
if count_only
|
52
52
|
self.jobs_per_class(job_class)
|
@@ -56,7 +56,7 @@ module Workerholic
|
|
56
56
|
end
|
57
57
|
end
|
58
58
|
|
59
|
-
def get_jobs_for_class(job_class)
|
59
|
+
def self.get_jobs_for_class(job_class)
|
60
60
|
serialized_jobs = storage.peek_namespace(job_class)
|
61
61
|
deserialized_stats = serialized_jobs.map do |serialized_job|
|
62
62
|
JobSerializer.deserialize_stats(serialized_job)
|
@@ -65,7 +65,7 @@ module Workerholic
|
|
65
65
|
deserialized_stats << deserialized_stats.size
|
66
66
|
end
|
67
67
|
|
68
|
-
def jobs_per_class(job_class)
|
68
|
+
def self.jobs_per_class(job_class)
|
69
69
|
clean_class_name = job_class.split(':').last
|
70
70
|
[clean_class_name, storage.list_length(job_class)]
|
71
71
|
end
|
data/lib/workerholic/version.rb
CHANGED