resque-job-stats-promptcloud 0.1.0 → 0.4.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5769ba71b39f54f345d77c40404fdee78785c473
4
- data.tar.gz: c6ca1858ee91ba5b3d79e1724b70d406f87a80d6
3
+ metadata.gz: 06d87a6861cf9541cc06b31b312f799a5f5245b4
4
+ data.tar.gz: 9220774bd94c797b3f515ff8ab5b643d9b31df8a
5
5
  SHA512:
6
- metadata.gz: 3b9d4fb2b1ef9c452f245950af0ff1f53838432a0ab0c2b4c15cf745bc03e359c1a623a13ea19dacfbb6a63216c02e2232ba1442f0990cfd2cf894a87c181849
7
- data.tar.gz: 517878d9328f92b898289d7a011f7ff1119b76b48d87bfb9d0ab8575f2f889f870f76538d749ac156151b0b785825aa050e1b91cf09fd0771a4dd31a6e5610aa
6
+ metadata.gz: e10c62291a483273d3a4fe0d7480895b351cc498ac03e6156ce90f3c53f592d326c5f1af2992fbc87b5c91aee238de8a81cb356b412554de7e094b3e0aeadc6a
7
+ data.tar.gz: 6a368ccf00534d11adfb272807d922b8381b7643149f1b76bf948cd7a3f012d83907e048a7fe09487a7cc88edc03a2581fd7b731db0094e1278f822ce8da77ea
@@ -11,7 +11,7 @@ require 'resque/plugins/job_stats/history'
11
11
  module Resque
12
12
  module Plugins
13
13
  module JobStats
14
- extend Resque::Plugins::JobStats::MeasuredHook
14
+ include Resque::Plugins::JobStats::MeasuredHook
15
15
  include Resque::Plugins::JobStats::Performed
16
16
  include Resque::Plugins::JobStats::Enqueued
17
17
  include Resque::Plugins::JobStats::Failed
@@ -2,7 +2,7 @@ module Resque
2
2
  module Plugins
3
3
  module JobStats
4
4
  module Duration
5
- extend Resque::Plugins::JobStats::MeasuredHook
5
+ include Resque::Plugins::JobStats::MeasuredHook
6
6
 
7
7
  # Resets all job durations
8
8
  def reset_job_durations
@@ -5,7 +5,7 @@ module Resque
5
5
  # Extend your job with this module to track how many
6
6
  # jobs are queued successfully
7
7
  module Enqueued
8
- extend Resque::Plugins::JobStats::MeasuredHook
8
+ include Resque::Plugins::JobStats::MeasuredHook
9
9
 
10
10
  # Sets the number of jobs queued
11
11
  def jobs_enqueued=(int)
@@ -5,7 +5,7 @@ module Resque
5
5
  # Extend your job with this module to track how many
6
6
  # jobs fail
7
7
  module Failed
8
- extend Resque::Plugins::JobStats::MeasuredHook
8
+ include Resque::Plugins::JobStats::MeasuredHook
9
9
 
10
10
  # Sets the number of jobs failed
11
11
  def jobs_failed=(int)
@@ -3,8 +3,18 @@ module Resque
3
3
  module JobStats
4
4
  module MeasuredHook
5
5
 
6
- def extended(base)
7
- Resque.redis.sadd("stats:jobs", base)
6
+ def self.included(base)
7
+ base.extend ClassMethods
8
+ end
9
+
10
+ module ClassMethods
11
+ def extended(base)
12
+ Resque::Plugins::JobStats.add_measured_job(base)
13
+ end
14
+ end
15
+
16
+ def inherited(subclass)
17
+ subclass.extend Resque::Plugins::JobStats
8
18
  end
9
19
 
10
20
  end
@@ -5,7 +5,7 @@ module Resque
5
5
  # Extend your job with this module to track how many
6
6
  # jobs are performed successfully
7
7
  module Performed
8
- extend Resque::Plugins::JobStats::MeasuredHook
8
+ include Resque::Plugins::JobStats::MeasuredHook
9
9
 
10
10
  # Sets the number of jobs performed
11
11
  def jobs_performed=(int)
@@ -57,7 +57,7 @@ module Resque
57
57
  end
58
58
 
59
59
  module Resque::Plugins::JobStats::Timeseries::Enqueued
60
- extend Resque::Plugins::JobStats::MeasuredHook
60
+ include Resque::Plugins::JobStats::MeasuredHook
61
61
  include Resque::Plugins::JobStats::Timeseries::Common
62
62
 
63
63
  # Increments the enqueued count for the timestamp when job is queued
@@ -77,7 +77,7 @@ module Resque::Plugins::JobStats::Timeseries::Enqueued
77
77
  end
78
78
 
79
79
  module Resque::Plugins::JobStats::Timeseries::Performed
80
- extend Resque::Plugins::JobStats::MeasuredHook
80
+ include Resque::Plugins::JobStats::MeasuredHook
81
81
  include Resque::Plugins::JobStats::Timeseries::Common
82
82
 
83
83
  # Increments the performed count for the timestamp when job is complete
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: resque-job-stats-promptcloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - alanpeabody
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-11-29 00:00:00.000000000 Z
11
+ date: 2018-11-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: resque