founders_toolkit 0.2.1 → 0.3.0
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/CHANGELOG.md +3 -0
- data/Gemfile.lock +4 -4
- data/lib/founders_toolkit/jobs/tracked_job.rb +28 -0
- data/lib/founders_toolkit/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3949030c0d0ccd14d3f91cf6f51f38df50fee9ba6b3480ea9fbf792fd48e02cf
|
4
|
+
data.tar.gz: b776d008c899fb9f1b0ec80279dd038465130c59ba84f306f57c922d0faeb1d7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 63c67c68c2bddcb332aee24196afecfa40ae50fdf2fb849db7a65586426a4c5fa8fdc370035f6292a130a996832854d048f48372ff8b7c0bfe20113f4bd87621
|
7
|
+
data.tar.gz: 3988e5238de63d396e0ea3ebf04a8b6c27fcb8a509742c2778a114546b2bebd608bd6555beda22191d35529809b6bcd3e16eb951c35c9f58c35ab29461c370be
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
6
6
|
|
7
7
|
## [Unreleased]
|
8
8
|
|
9
|
+
## [0.3.0] - 2021-03-29
|
10
|
+
- Added TrackedJob for simple statsd active job monitoring
|
11
|
+
|
9
12
|
## [0.2.1] - 2021-03-25
|
10
13
|
### Fixed
|
11
14
|
- Fixed the protected attributes validator when updating the password.
|
data/Gemfile.lock
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
founders_toolkit (0.
|
4
|
+
founders_toolkit (0.3.0)
|
5
5
|
activemodel (~> 6.1)
|
6
6
|
activesupport (~> 6.1)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
activemodel (6.1.3)
|
12
|
-
activesupport (= 6.1.3)
|
13
|
-
activesupport (6.1.3)
|
11
|
+
activemodel (6.1.3.1)
|
12
|
+
activesupport (= 6.1.3.1)
|
13
|
+
activesupport (6.1.3.1)
|
14
14
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
15
15
|
i18n (>= 1.6, < 2)
|
16
16
|
minitest (>= 5.1)
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module FoundersToolkit::Jobs
|
4
|
+
module TrackedJob
|
5
|
+
extend ActiveSupport::Concern
|
6
|
+
|
7
|
+
included do
|
8
|
+
include FoundersToolkit::Monitoring::Statsdable
|
9
|
+
|
10
|
+
around_perform :update_stats
|
11
|
+
end
|
12
|
+
|
13
|
+
private
|
14
|
+
|
15
|
+
def update_stats(&block)
|
16
|
+
statsd.increment("active_job.#{self.class.queue_name}.#{self.class.name}.started")
|
17
|
+
statsd.time("active_job.#{self.class.queue_name}.#{self.class.name}", &block)
|
18
|
+
statsd.increment("active_job.#{self.class.queue_name}.#{self.class.name}.finished")
|
19
|
+
update_queue_size_stats
|
20
|
+
end
|
21
|
+
|
22
|
+
def update_queue_size_stats
|
23
|
+
Resque.queues.each do |name|
|
24
|
+
statsd.gauge("active_job.queue_size.#{name}", Resque.size(name))
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: founders_toolkit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Trae Robrock
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2021-03-
|
12
|
+
date: 2021-03-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activemodel
|
@@ -76,6 +76,7 @@ files:
|
|
76
76
|
- lib/founders_toolkit/auth/securable/validations/protected_validator.rb
|
77
77
|
- lib/founders_toolkit/engine.rb
|
78
78
|
- lib/founders_toolkit/jobs/locked_job.rb
|
79
|
+
- lib/founders_toolkit/jobs/tracked_job.rb
|
79
80
|
- lib/founders_toolkit/monitoring/statsdable.rb
|
80
81
|
- lib/founders_toolkit/util.rb
|
81
82
|
- lib/founders_toolkit/util/cacheable.rb
|