switchman-inst-jobs 1.2.2 → 1.3.0

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
- SHA256:
3
- metadata.gz: fe62bac55da9767562a2a12d326c083c4afa25fedd1137649e9f93069880e677
4
- data.tar.gz: 7a81ab061398ac23f87e08e1788db57f31334aa680f09d240038bbc7d45153c6
2
+ SHA1:
3
+ metadata.gz: 391dd2c8243d1db7d67181078f8b4ebb0e7a88a5
4
+ data.tar.gz: a3701106776b9291f77db762415eb6f95c6afacf
5
5
  SHA512:
6
- metadata.gz: 58c37e47c0309dfa858342a935522a4bea26659de2362d602707be8f8b4a046bc02f29e7dc725d3640638b0992c138323e5ebc80d29e172480278cf2be08c2e2
7
- data.tar.gz: 36ac9b3d86196b084ae00334c6ed8893b2995f1772553a183130545b210e6ba09312d6b6263912252902886e72cf232adb2a90ed827d7818805a608d55bfb9b7
6
+ metadata.gz: 99a12c96059bc8a0b72fbd67ac902409b404143c12b58d9cdad5764644e5a94c02a1feaa29d35d2664df950863b66d1ee7f5c44ef88cb89a5456a5cd3183d188
7
+ data.tar.gz: e994ce80dd113545fa6ffddc75f30a2b53d56708b6b1d8f9758ebbf4ec5591601b0664bfb2c42a9a95d7604febbd09940afcfa9c7082daffb06fac3f79cd0c76
@@ -19,6 +19,7 @@ module SwitchmanInstJobs
19
19
  ::Delayed::Pool.prepend Delayed::Pool
20
20
  ::Delayed::Worker.prepend Delayed::Worker
21
21
  ::Delayed::Worker::HealthCheck.prepend Delayed::Worker::HealthCheck
22
+ ::SwitchmanInstJobs::NewRelic.enable
22
23
  ::Object.include Delayed::MessageSending
23
24
  end
24
25
 
@@ -41,6 +42,7 @@ require 'switchman_inst_jobs/delayed/pool'
41
42
  require 'switchman_inst_jobs/delayed/worker'
42
43
  require 'switchman_inst_jobs/delayed/worker/health_check'
43
44
  require 'switchman_inst_jobs/engine'
45
+ require 'switchman_inst_jobs/new_relic'
44
46
  require 'switchman_inst_jobs/shackles'
45
47
  require 'switchman_inst_jobs/switchman/database_server'
46
48
  require 'switchman_inst_jobs/switchman/default_shard'
@@ -0,0 +1,32 @@
1
+ module SwitchmanInstJobs
2
+ module NewRelic
3
+ module FixNewRelicDelayedJobs
4
+ module NewRelicJobInvoker
5
+ if defined?(::NewRelic)
6
+ include ::NewRelic::Agent::Instrumentation::ControllerInstrumentation
7
+ end
8
+
9
+ def invoke_job(*args, &block)
10
+ options = {
11
+ category: NR_TRANSACTION_CATEGORY,
12
+ path: tag
13
+ }
14
+
15
+ perform_action_with_newrelic_trace(options) do
16
+ super(*args, &block)
17
+ end
18
+ end
19
+ end
20
+
21
+ def install_newrelic_job_tracer
22
+ ::Delayed::Job.prepend NewRelicJobInvoker
23
+ end
24
+ end
25
+
26
+ def self.enable
27
+ return unless defined?(::NewRelic)
28
+
29
+ ::Delayed::Worker.prepend FixNewRelicDelayedJobs
30
+ end
31
+ end
32
+ end
@@ -1,3 +1,3 @@
1
1
  module SwitchmanInstJobs
2
- VERSION = '1.2.2'.freeze
2
+ VERSION = '1.3.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: switchman-inst-jobs
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bryan Petty
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-11-26 00:00:00.000000000 Z
11
+ date: 2019-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: inst-jobs
@@ -112,6 +112,20 @@ dependencies:
112
112
  - - ">="
113
113
  - !ruby/object:Gem::Version
114
114
  version: '0'
115
+ - !ruby/object:Gem::Dependency
116
+ name: newrelic_rpm
117
+ requirement: !ruby/object:Gem::Requirement
118
+ requirements:
119
+ - - ">="
120
+ - !ruby/object:Gem::Version
121
+ version: '0'
122
+ type: :development
123
+ prerelease: false
124
+ version_requirements: !ruby/object:Gem::Requirement
125
+ requirements:
126
+ - - ">="
127
+ - !ruby/object:Gem::Version
128
+ version: '0'
115
129
  - !ruby/object:Gem::Dependency
116
130
  name: pg
117
131
  requirement: !ruby/object:Gem::Requirement
@@ -243,6 +257,7 @@ files:
243
257
  - lib/switchman_inst_jobs/delayed/worker.rb
244
258
  - lib/switchman_inst_jobs/delayed/worker/health_check.rb
245
259
  - lib/switchman_inst_jobs/engine.rb
260
+ - lib/switchman_inst_jobs/new_relic.rb
246
261
  - lib/switchman_inst_jobs/shackles.rb
247
262
  - lib/switchman_inst_jobs/switchman/database_server.rb
248
263
  - lib/switchman_inst_jobs/switchman/default_shard.rb
@@ -269,7 +284,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
269
284
  version: '0'
270
285
  requirements: []
271
286
  rubyforge_project:
272
- rubygems_version: 2.7.6
287
+ rubygems_version: 2.6.14.1
273
288
  signing_key:
274
289
  specification_version: 4
275
290
  summary: Switchman and Instructure Jobs compatibility gem.