good_job 2.0.4 → 2.0.5

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
  SHA256:
3
- metadata.gz: 0bd31f146a92ec1f425a62a356e7b334a0ed7e0f2374092d15f230585eaf9765
4
- data.tar.gz: cec7507b4fb07ef74a6afe46c1d513f8274d3e88ff9bb223f07dd8ad6cd67f9c
3
+ metadata.gz: fe9ce3416f1a816d3aa317139da71333f36c69dec121371c163a4965d61a2a6a
4
+ data.tar.gz: 1d3cd7fd9bb43ccc0b0f94bbdf99cf2cd3865f4316ea8178aa67e4c3dfb9a97b
5
5
  SHA512:
6
- metadata.gz: d5e9264f4ec1b26d6e6126c199a76943062dea110d0ebe905b4fc596a2018c19584c5442d4dfc72ed969e88d5c1a82165144829a7d45adb621c7dcd62c62270a
7
- data.tar.gz: 33a06b4b1011c570ff8ef77ee23b0786e1b0980033a3fe43c248de6f383984d2a7afd029ebdcde61610de13ae3825f6d5dd60def661402a5365669327c8b75d1
6
+ metadata.gz: 6aa38c7714d0e5e959d0dfcd48fc9cfcbbae475d40cdd9d9f3aa452178b470de500cc1c0513c00a80e4d8b2e762c73b2a55b1233a638d6acb7c3320ecdb16975
7
+ data.tar.gz: 96ec7cc7fbdb4cdc232a1ddfd046df5aa7976336e639d77fe3ff8dfdc9d2814cebdf88d8450aab2afa7f80a4b911282b96632fe04602c6dba5548a4435fce41f
data/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## [v2.0.5](https://github.com/bensheldon/good_job/tree/v2.0.5) (2021-09-06)
4
+
5
+ [Full Changelog](https://github.com/bensheldon/good_job/compare/v2.0.4...v2.0.5)
6
+
7
+ **Closed issues:**
8
+
9
+ - Serialized Params and ActiveJob extensions [\#362](https://github.com/bensheldon/good_job/issues/362)
10
+
11
+ **Merged pull requests:**
12
+
13
+ - `deep_dup` serialized job data instead of`attr_readonly` to prevent overwriting [\#363](https://github.com/bensheldon/good_job/pull/363) ([bensheldon](https://github.com/bensheldon))
14
+
3
15
  ## [v2.0.4](https://github.com/bensheldon/good_job/tree/v2.0.4) (2021-08-31)
4
16
 
5
17
  [Full Changelog](https://github.com/bensheldon/good_job/compare/v2.0.3...v2.0.4)
data/lib/good_job/job.rb CHANGED
@@ -18,8 +18,6 @@ module GoodJob
18
18
  self.table_name = 'good_jobs'
19
19
  self.advisory_lockable_column = 'active_job_id'
20
20
 
21
- attr_readonly :serialized_params
22
-
23
21
  # Parse a string representing a group of queues into a more readable data
24
22
  # structure.
25
23
  # @param string [String] Queue string
@@ -277,14 +275,14 @@ module GoodJob
277
275
 
278
276
  # @return [ExecutionResult]
279
277
  def execute
280
- params = serialized_params.merge(
281
- "provider_job_id" => id
282
- )
283
-
284
278
  GoodJob::CurrentExecution.reset
285
279
  GoodJob::CurrentExecution.good_job = self
280
+
281
+ job_data = serialized_params.deep_dup
282
+ job_data["provider_job_id"] = id
283
+
286
284
  ActiveSupport::Notifications.instrument("perform_job.good_job", { good_job: self, process_id: GoodJob::CurrentExecution.process_id, thread_name: GoodJob::CurrentExecution.thread_name }) do
287
- value = ActiveJob::Base.execute(params)
285
+ value = ActiveJob::Base.execute(job_data)
288
286
 
289
287
  if value.is_a?(Exception)
290
288
  handled_error = value
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
  module GoodJob
3
3
  # GoodJob gem version.
4
- VERSION = '2.0.4'
4
+ VERSION = '2.0.5'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: good_job
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.4
4
+ version: 2.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Sheldon
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-08-31 00:00:00.000000000 Z
11
+ date: 2021-09-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activejob