good_job 1.11.2 → 1.11.3

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.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +25 -6
  3. data/engine/app/controllers/good_job/active_jobs_controller.rb +1 -0
  4. data/engine/app/controllers/good_job/assets_controller.rb +1 -0
  5. data/engine/app/controllers/good_job/base_controller.rb +1 -0
  6. data/engine/app/controllers/good_job/dashboards_controller.rb +1 -0
  7. data/engine/app/controllers/good_job/jobs_controller.rb +1 -0
  8. data/engine/app/helpers/good_job/application_helper.rb +1 -0
  9. data/engine/app/views/layouts/good_job/base.html.erb +5 -5
  10. data/engine/config/routes.rb +11 -5
  11. data/engine/lib/good_job/engine.rb +1 -0
  12. data/exe/good_job +1 -0
  13. data/lib/active_job/queue_adapters/good_job_adapter.rb +1 -0
  14. data/lib/generators/good_job/install_generator.rb +1 -0
  15. data/lib/generators/good_job/templates/update/migrations/01_create_good_jobs.rb +1 -0
  16. data/lib/generators/good_job/templates/update/migrations/02_add_active_job_id_concurrency_key_cron_key_to_good_jobs.rb +1 -0
  17. data/lib/generators/good_job/templates/update/migrations/03_add_active_job_id_index_and_concurrency_key_index_to_good_jobs.rb +1 -0
  18. data/lib/generators/good_job/update_generator.rb +1 -0
  19. data/lib/good_job.rb +1 -0
  20. data/lib/good_job/active_job_extensions.rb +1 -0
  21. data/lib/good_job/active_job_extensions/concurrency.rb +1 -0
  22. data/lib/good_job/adapter.rb +1 -0
  23. data/lib/good_job/cli.rb +1 -0
  24. data/lib/good_job/configuration.rb +1 -0
  25. data/lib/good_job/current_execution.rb +1 -0
  26. data/lib/good_job/daemon.rb +1 -0
  27. data/lib/good_job/execution_result.rb +1 -0
  28. data/lib/good_job/job.rb +4 -3
  29. data/lib/good_job/job_performer.rb +1 -0
  30. data/lib/good_job/lockable.rb +1 -0
  31. data/lib/good_job/log_subscriber.rb +1 -0
  32. data/lib/good_job/multi_scheduler.rb +1 -0
  33. data/lib/good_job/notifier.rb +2 -1
  34. data/lib/good_job/poller.rb +1 -0
  35. data/lib/good_job/railtie.rb +1 -0
  36. data/lib/good_job/scheduler.rb +1 -0
  37. data/lib/good_job/version.rb +2 -1
  38. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d78c670393e4cddbedfe9512fdda95855709d830618cd63cfde7e724f26ce6c8
4
- data.tar.gz: 494d3b0d6ec2b05d0bcc3386c14baca6071635647ed808a9b3543b5f1ebc4bfb
3
+ metadata.gz: 5e0f0ca8d7f8b024f5e84b515b8603d362b6c755d54680221e517369b6877c07
4
+ data.tar.gz: e69518c9d71d7b08e3707c9df8c6429ca4d9823fd1adea32adc6c0bf41ad33f4
5
5
  SHA512:
6
- metadata.gz: bef7307febc465eab519c44a214287d5203bf0a024d83e46160dbbaf94b3a0fcd1317fbe99e446d9b0f01fb2bc8845a6dfe722fb123020aab96fe31b0c189d71
7
- data.tar.gz: 737c03b9ad35169c9db43070abca6f644816876217fd333831db568f43eca6738dd9327eb7a403eb901ab6643e06445ba7764453d3f9b05e9e7c1159f7ba0963
6
+ metadata.gz: 50d2542bfad082dfba516c08bd994dad3fcd6e8311a8380dc012988c3e2745378271adc7d41cb91897d087a6b2b100cfb69362d3a11cd55c92c2610ceabeb80c
7
+ data.tar.gz: 69ffc79dc9367fc8522bdcf669cede6791d4e7903847edbc99887404b29ec43361de54a960841ee6cdeaaf236cc77d8c9c60b2c61793b5256bf2455667e0c387
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## [v1.11.3](https://github.com/bensheldon/good_job/tree/v1.11.3) (2021-07-25)
4
+
5
+ [Full Changelog](https://github.com/bensheldon/good_job/compare/v1.11.2...v1.11.3)
6
+
7
+ **Closed issues:**
8
+
9
+ - ERROR: relation "good\_jobs" does not exist at character 454 [\#308](https://github.com/bensheldon/good_job/issues/308)
10
+ - Add Frozen String Literal to all files [\#298](https://github.com/bensheldon/good_job/issues/298)
11
+ - Support for good\_job without Rails? [\#295](https://github.com/bensheldon/good_job/issues/295)
12
+
13
+ **Merged pull requests:**
14
+
15
+ - Have prettier Dashboard asset urls e.g. `bootstrap.css` instead of `bootstrap_css.css` [\#306](https://github.com/bensheldon/good_job/pull/306) ([bensheldon](https://github.com/bensheldon))
16
+ - Create dashboard demo app on Heroku [\#305](https://github.com/bensheldon/good_job/pull/305) ([bensheldon](https://github.com/bensheldon))
17
+ - Add Frozen String Literal to all files [\#302](https://github.com/bensheldon/good_job/pull/302) ([tedhexaflow](https://github.com/tedhexaflow))
18
+
3
19
  ## [v1.11.2](https://github.com/bensheldon/good_job/tree/v1.11.2) (2021-07-20)
4
20
 
5
21
  [Full Changelog](https://github.com/bensheldon/good_job/compare/v1.11.1...v1.11.2)
@@ -22,13 +38,13 @@
22
38
 
23
39
  [Full Changelog](https://github.com/bensheldon/good_job/compare/v1.11.0...v1.11.1)
24
40
 
25
- **Closed issues:**
41
+ **Fixed bugs:**
26
42
 
27
- - Database connection required while loading the code on 1.10.x [\#291](https://github.com/bensheldon/good_job/issues/291)
43
+ - Defer accessing ActiveRecord `primary_key` in Lockable [\#293](https://github.com/bensheldon/good_job/pull/293) ([bensheldon](https://github.com/bensheldon))
28
44
 
29
- **Merged pull requests:**
45
+ **Closed issues:**
30
46
 
31
- - Defer accessing ActiveRecord `primary_key` in Lockable [\#293](https://github.com/bensheldon/good_job/pull/293) ([bensheldon](https://github.com/bensheldon))
47
+ - Database connection required while loading the code on 1.10.x [\#291](https://github.com/bensheldon/good_job/issues/291)
32
48
 
33
49
  ## [v1.11.0](https://github.com/bensheldon/good_job/tree/v1.11.0) (2021-07-07)
34
50
 
@@ -50,9 +66,12 @@
50
66
 
51
67
  [Full Changelog](https://github.com/bensheldon/good_job/compare/v1.10.0...v1.10.1)
52
68
 
53
- **Merged pull requests:**
69
+ **Fixed bugs:**
54
70
 
55
71
  - Remove `FOR UPDATE SKIP LOCKED` from job locking sql statement [\#288](https://github.com/bensheldon/good_job/pull/288) ([bensheldon](https://github.com/bensheldon))
72
+
73
+ **Merged pull requests:**
74
+
56
75
  - Update GH Test Matrix with latest JRuby 9.2.19.0 [\#283](https://github.com/bensheldon/good_job/pull/283) ([tedhexaflow](https://github.com/tedhexaflow))
57
76
 
58
77
  ## [v1.10.0](https://github.com/bensheldon/good_job/tree/v1.10.0) (2021-06-29)
@@ -61,11 +80,11 @@
61
80
 
62
81
  **Implemented enhancements:**
63
82
 
83
+ - Use `pg_advisory_unlock_all` after each thread's job execution; fix Lockable return values; improve test stability [\#285](https://github.com/bensheldon/good_job/pull/285) ([bensheldon](https://github.com/bensheldon))
64
84
  - Add `rails g good_job:update` command to add idempotent migration files, including `active_job_id`, `concurrency_key`, `cron_key` columns [\#266](https://github.com/bensheldon/good_job/pull/266) ([bensheldon](https://github.com/bensheldon))
65
85
 
66
86
  **Fixed bugs:**
67
87
 
68
- - Use `pg_advisory_unlock_all` after each thread's job execution; fix Lockable return values; improve test stability [\#285](https://github.com/bensheldon/good_job/pull/285) ([bensheldon](https://github.com/bensheldon))
69
88
  - Dashboard AssetsController does not raise if verify\_authenticity\_token is not in the callback chain [\#284](https://github.com/bensheldon/good_job/pull/284) ([bensheldon](https://github.com/bensheldon))
70
89
 
71
90
  **Closed issues:**
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module GoodJob
2
3
  class ActiveJobsController < GoodJob::BaseController
3
4
  def show
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module GoodJob
2
3
  class AssetsController < ActionController::Base # rubocop:disable Rails/ApplicationController
3
4
  skip_before_action :verify_authenticity_token, raise: false
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module GoodJob
2
3
  class BaseController < ActionController::Base # rubocop:disable Rails/ApplicationController
3
4
  protect_from_forgery with: :exception
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module GoodJob
2
3
  class DashboardsController < GoodJob::BaseController
3
4
  class JobFilter
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module GoodJob
2
3
  class JobsController < GoodJob::BaseController
3
4
  def destroy
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module GoodJob
2
3
  module ApplicationHelper
3
4
  end
@@ -5,12 +5,12 @@
5
5
  <%= csrf_meta_tags %>
6
6
  <%= csp_meta_tag %>
7
7
 
8
- <%= stylesheet_link_tag bootstrap_css_path(v: GoodJob::VERSION) %>
9
- <%= stylesheet_link_tag chartist_css_path(v: GoodJob::VERSION) %>
10
- <%= stylesheet_link_tag style_css_path(v: GoodJob::VERSION) %>
8
+ <%= stylesheet_link_tag bootstrap_path(format: :css, v: GoodJob::VERSION) %>
9
+ <%= stylesheet_link_tag chartist_path(format: :css, v: GoodJob::VERSION) %>
10
+ <%= stylesheet_link_tag style_path(format: :css, v: GoodJob::VERSION) %>
11
11
 
12
- <%= javascript_include_tag bootstrap_js_path(v: GoodJob::VERSION) %>
13
- <%= javascript_include_tag chartist_js_path(v: GoodJob::VERSION) %>
12
+ <%= javascript_include_tag bootstrap_path(format: :js, v: GoodJob::VERSION) %>
13
+ <%= javascript_include_tag chartist_path(format: :js, v: GoodJob::VERSION) %>
14
14
  </head>
15
15
  <body>
16
16
  <nav class="navbar navbar-expand-lg navbar-light bg-light">
@@ -1,13 +1,19 @@
1
+ # frozen_string_literal: true
1
2
  GoodJob::Engine.routes.draw do
2
3
  root to: 'dashboards#index'
3
4
  resources :active_jobs, only: %i[show]
4
5
  resources :jobs, only: %i[destroy]
5
6
 
6
7
  scope controller: :assets do
7
- get :bootstrap_css
8
- get :bootstrap_js
9
- get :chartist_css
10
- get :chartist_js
11
- get :style_css
8
+ constraints(format: :css) do
9
+ get :bootstrap, action: :bootstrap_css
10
+ get :chartist, action: :chartist_css
11
+ get :style, action: :style_css
12
+ end
13
+
14
+ constraints(format: :js) do
15
+ get :bootstrap, action: :bootstrap_js
16
+ get :chartist, action: :chartist_js
17
+ end
12
18
  end
13
19
  end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module GoodJob
2
3
  class Engine < ::Rails::Engine
3
4
  isolate_namespace GoodJob
data/exe/good_job CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
  require 'good_job/cli'
3
4
 
4
5
  GoodJob::CLI.within_exe = true
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module ActiveJob # :nodoc:
2
3
  module QueueAdapters # :nodoc:
3
4
  # See {GoodJob::Adapter} for details.
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'rails/generators'
2
3
  require 'rails/generators/active_record'
3
4
  module GoodJob
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  class CreateGoodJobs < ActiveRecord::Migration[5.2]
2
3
  def change
3
4
  enable_extension 'pgcrypto'
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  class AddActiveJobIdConcurrencyKeyCronKeyToGoodJobs < ActiveRecord::Migration[5.2]
2
3
  def change
3
4
  reversible do |dir|
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  class AddActiveJobIdIndexAndConcurrencyKeyIndexToGoodJobs < ActiveRecord::Migration[5.2]
2
3
  disable_ddl_transaction!
3
4
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'rails/generators'
2
3
  require 'rails/generators/active_record'
3
4
 
data/lib/good_job.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require "rails"
2
3
  require "active_job"
3
4
  require "active_job/queue_adapters"
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module GoodJob
2
3
  module ActiveJobExtensions
3
4
  end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module GoodJob
2
3
  module ActiveJobExtensions
3
4
  module Concurrency
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module GoodJob
2
3
  #
3
4
  # ActiveJob Adapter.
data/lib/good_job/cli.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'thor'
2
3
 
3
4
  module GoodJob
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module GoodJob
2
3
  #
3
4
  # +GoodJob::Configuration+ provides normalized configuration information to
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'active_support/core_ext/module/attribute_accessors_per_thread'
2
3
 
3
4
  module GoodJob
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module GoodJob
2
3
  #
3
4
  # Manages daemonization of the current process.
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module GoodJob
2
3
  # Stores the results of job execution
3
4
  class ExecutionResult
data/lib/good_job/job.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module GoodJob
2
3
  # ActiveRecord model that represents an +ActiveJob+ job.
3
4
  # Parent class can be configured with +GoodJob.active_record_parent_class+.
@@ -10,12 +11,12 @@ module GoodJob
10
11
  PreviouslyPerformedError = Class.new(StandardError)
11
12
 
12
13
  # ActiveJob jobs without a +queue_name+ attribute are placed on this queue.
13
- DEFAULT_QUEUE_NAME = 'default'.freeze
14
+ DEFAULT_QUEUE_NAME = 'default'
14
15
  # ActiveJob jobs without a +priority+ attribute are given this priority.
15
16
  DEFAULT_PRIORITY = 0
16
17
 
17
- self.table_name = 'good_jobs'.freeze
18
- self.advisory_lockable_column = 'id'.freeze
18
+ self.table_name = 'good_jobs'
19
+ self.advisory_lockable_column = 'id'
19
20
 
20
21
  attr_readonly :serialized_params
21
22
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'concurrent/delay'
2
3
 
3
4
  module GoodJob
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module GoodJob
2
3
  #
3
4
  # Adds Postgres advisory locking capabilities to an ActiveRecord record.
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module GoodJob
2
3
  #
3
4
  # Listens to GoodJob notifications and logs them.
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module GoodJob
2
3
  # Delegates the interface of a single {Scheduler} to multiple Schedulers.
3
4
  class MultiScheduler
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'concurrent/atomic/atomic_boolean'
2
3
 
3
4
  module GoodJob # :nodoc:
@@ -13,7 +14,7 @@ module GoodJob # :nodoc:
13
14
  AdapterCannotListenError = Class.new(StandardError)
14
15
 
15
16
  # Default Postgres channel for LISTEN/NOTIFY
16
- CHANNEL = 'good_job'.freeze
17
+ CHANNEL = 'good_job'
17
18
  # Defaults for instance of Concurrent::ThreadPoolExecutor
18
19
  EXECUTOR_OPTIONS = {
19
20
  name: name,
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'concurrent/atomic/atomic_boolean'
2
3
 
3
4
  module GoodJob # :nodoc:
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module GoodJob
2
3
  # Ruby on Rails integration.
3
4
  class Railtie < ::Rails::Railtie
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require "concurrent/executor/thread_pool_executor"
2
3
  require "concurrent/executor/timer_set"
3
4
  require "concurrent/scheduled_task"
@@ -1,4 +1,5 @@
1
+ # frozen_string_literal: true
1
2
  module GoodJob
2
3
  # GoodJob gem version.
3
- VERSION = '1.11.2'.freeze
4
+ VERSION = '1.11.3'
4
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: 1.11.2
4
+ version: 1.11.3
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-07-20 00:00:00.000000000 Z
11
+ date: 2021-07-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activejob