mission_control-jobs 0.1.0 → 0.1.1

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
2
  SHA256:
3
- metadata.gz: 63e12a3c6650d55dd75e269ca604320316a5400c6e7b9429b16a05de167717a7
4
- data.tar.gz: 617b2ea6236f481ed4ee6b6c22e5b72570b75d9e2bcf69e0cf60ba18eec69e06
3
+ metadata.gz: 3c261d6b55b908312495212d5f925b3b4150f59a895b185a5667ce0b9754f9f6
4
+ data.tar.gz: db330e0f62f17e8b3e46f63233b8f7fffe5a126f746b7d83bc3afa94c9e07664
5
5
  SHA512:
6
- metadata.gz: 91a3206ed4772d01f441d7fe6ed10b0e8dc27beb6828333b3805ad65cc314d13157c9a6e2d07f0bed46f09f911549d28250244f320a9dc637883135e5c10f627
7
- data.tar.gz: c6f173db8d4d4be438b91ad8925d381f5eb44aabda18fcd9f4b174f91bf80922c779ca7eb71132046c952b496c379209c29c7da1aec94f667f01365a51b79c3a
6
+ metadata.gz: 670df5d56e857f5f9b230c884447738763379c803be0014933016554277463bcaf9aa74c0e52289cf3c54783f74ed16fc13338637e8d78b70b1bfd82ffa7849c
7
+ data.tar.gz: cad6605c7296b828d1078ef09def60152267dc3d07196481a51f1b5f49cec70b5a0b0b9b8fcc1add4739d28bf8ad6b38c7a62197111c0c047a5771ce1504cc4a
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Mission Control — Jobs
2
2
 
3
- This gem provides a Rails-based frontend to Active Job adapters. It currently supports [Resque](https://github.com/resque/resque/) and [Solid Queue](https://github.com/basecamp/solid_queue). Its features depend on those offered by the adapter itself, but at a minimum, it allows you to inspect job queues, jobs currently waiting in those queues, and inspecting and retrying or discarding failed jobs.
3
+ This gem provides a Rails-based frontend to Active Job adapters. It currently supports [Resque](https://github.com/resque/resque/) and [Solid Queue](https://github.com/basecamp/solid_queue). Its features depend on those offered by the adapter itself. At a minimum, it allows you to inspect job queues and jobs currently waiting in those queues and inspect and retry or discard failed jobs.
4
4
 
5
5
  ## Installation
6
6
  Add this line to your application's Gemfile:
@@ -55,12 +55,12 @@ Besides `base_controller_class`, you can also set the following for `MissionCont
55
55
  - `delay_between_bulk_operation_batches`: how long to wait between batches when performing bulk operations, such as _discard all_ or _retry all_ jobs—defaults to `0`
56
56
  - `adapters`: a list of adapters that you want Mission Control to use and extend. By default this will be the adapter you have set for `active_job.queue_adapter`.
57
57
 
58
- This library extends Active Job with a querying interface, and the following setting:
58
+ This library extends Active Job with a querying interface and the following setting:
59
59
  - `config.active_job.default_page_size`: the internal batch size that Active Job will use when sending queries to the underlying adapter and the batch size for the bulk operations defined above—defaults to `1000`.
60
60
 
61
61
  ## Advanced configuration
62
62
 
63
- When we built Mission Control Jobs, we did it with the idea of managing multiple apps' job backends from a single, centralized app that we used for monitoring, alerts and other tools that related to all our apps. Some of our apps run in more than one datacenter and we run different Resque instances with different Redis configurations in each. Because of this, we added support for multiple apps and multiple adapters per app. Even when running Mission Control Job within the app it manages and a single DC, as we migrated from Resque to Solid Queue, we needed to manage both adapters from Mission Control.
63
+ When we built Mission Control Jobs, we did it with the idea of managing multiple apps' job backends from a single, centralized app that we used for monitoring, alerts and other tools that related to all our apps. Some of our apps run in more than one datacenter, and we run different Resque instances with different Redis configurations in each. Because of this, we added support for multiple apps and multiple adapters per app. Even when running Mission Control Job within the app it manages, and a single DC, as we migrated from Resque to Solid Queue, we needed to manage both adapters from Mission Control.
64
64
 
65
65
  Without adding any additional configuration to [the one described before](#basic-configuration), Mission Control will be configured with one single app and a single server for your configured `active_job.queue_adapter`.
66
66
 
@@ -105,9 +105,9 @@ SERVERS_BY_APP.each do |app, servers|
105
105
  end
106
106
  ```
107
107
 
108
- This is an example for two different apps, BC4 and HEY, each one with two servers. BC4 has two Resque servers with two different configurations and HEY has one Resque server and one Solid Queue server.
108
+ This is an example for two different apps, BC4 and HEY, each one with two servers. BC4 has two Resque servers with two different configurations, and HEY has one Resque server and one Solid Queue server.
109
109
 
110
- Currently only one Solid Queue configuration is supported, but support for several Solid Queue backends (with different databases) [is planned](https://github.com/basecamp/mission_control-jobs/issues/35).
110
+ Currently, only one Solid Queue configuration is supported, but support for several Solid Queue backends (with different databases) [is planned](https://github.com/basecamp/mission_control-jobs/issues/35).
111
111
 
112
112
  This is how we set Resque and Solid Queue together when we migrated from one to the other:
113
113
 
@@ -141,9 +141,9 @@ As mentioned, the features available in Mission Control depend on the adapter yo
141
141
 
142
142
  ## Console helpers, scripting and dealing with big sets of jobs
143
143
 
144
- Besides the UI, Mission Control provides a light console helper to switch between applications and adapters. Some potentially destructive actions aren't exposed via the UI (for example, discarding jobs that aren't failed, although this might change in the future) but you can always perform these from the console if you know very well what you're doing.
144
+ Besides the UI, Mission Control provides a light console helper to switch between applications and adapters. Some potentially destructive actions aren't exposed via the UI (for example, discarding jobs that aren't failed, although this might change in the future), but you can always perform these from the console if you know very well what you're doing.
145
145
 
146
- It's also possible that you need to deal with very big sets of jobs that are unmanageable via the UI, or that you wish to write a script to deal with an incident, some cleanup or some data migration. The console helpers and the querying API with which we've extended Active Job come handy here.
146
+ It's also possible that you need to deal with very big sets of jobs that are unmanageable via the UI or that you wish to write a script to deal with an incident, some cleanup or some data migration. The console helpers and the querying API with which we've extended Active Job come in handy here.
147
147
 
148
148
  First, when connecting to the Rails console, you'll see this new message:
149
149
 
@@ -193,7 +193,7 @@ ActiveJob.jobs.failed.where(job_class: "SomeJob")
193
193
  # All pending jobs of a given class with limit and offset
194
194
  ActiveJob.jobs.pending.where(job_class: "SomeJob").limit(10).offset(5)
195
195
 
196
- # For adpaters that support these statuses:
196
+ # For adapters that support these statuses:
197
197
  # All scheduled/in-progress/finished jobs of a given class
198
198
  ActiveJob.jobs.scheudled.where(job_class: "SomeJob")
199
199
  ActiveJob.jobs.in_progress.where(job_class: "SomeJob")
@@ -229,7 +229,7 @@ MissionControl::Jobs.delay_between_bulk_operation_batches = 5.seconds
229
229
 
230
230
  ## Contributing
231
231
 
232
- Thanks for your interest in contributing! To get the app running locally just run:
232
+ Thanks for your interest in contributing! To get the app running locally, just run:
233
233
  ```
234
234
  bin/setup
235
235
  ```
@@ -2,7 +2,7 @@ module MissionControl::Jobs::JobScoped
2
2
  extend ActiveSupport::Concern
3
3
 
4
4
  included do
5
- before_action :set_job, except: :index
5
+ before_action :set_job
6
6
  end
7
7
 
8
8
  private
@@ -1,6 +1,8 @@
1
1
  class MissionControl::Jobs::JobsController < MissionControl::Jobs::ApplicationController
2
2
  include MissionControl::Jobs::JobScoped, MissionControl::Jobs::JobFilters
3
3
 
4
+ skip_before_action :set_job, only: :index
5
+
4
6
  def index
5
7
  @job_class_names = jobs_with_status.job_class_names
6
8
  @queue_names = ApplicationJob.queues.map(&:name)
@@ -1,5 +1,5 @@
1
1
  module MissionControl
2
2
  module Jobs
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mission_control-jobs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jorge Manrubia
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-30 00:00:00.000000000 Z
11
+ date: 2024-01-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails