mission_control-jobs 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/app/assets/stylesheets/mission_control/jobs/application.css +2 -16
- data/app/controllers/mission_control/jobs/application_controller.rb +8 -0
- data/app/models/mission_control/jobs/recurring_task.rb +1 -1
- data/app/views/mission_control/jobs/recurring_tasks/_general_information.html.erb +29 -8
- data/app/views/mission_control/jobs/recurring_tasks/_recurring_task.html.erb +7 -3
- data/lib/active_job/queue_adapters/solid_queue_ext/recurring_tasks.rb +4 -1
- data/lib/mission_control/jobs/engine.rb +4 -0
- data/lib/mission_control/jobs/version.rb +1 -1
- metadata +18 -5
- data/app/assets/config/mission_control_jobs_manifest.js +0 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d7d0d51d0662e0351ff33ed1b2a480a7f1d11c593eefbe89a630a980de5a1b24
|
4
|
+
data.tar.gz: a9c05be3a1b2b0975c3d7095ac3d3433c502b5afd87a942996ced2aa01485b6c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de6116de1a5b4fd7b87d4aba9e245953147edaa3cf8dd9e5e464be815dec79d74977dbe60b638246a6fe3625f9cb050aaceb9cd09c73eda857b1756006700328
|
7
|
+
data.tar.gz: 4e133652b36ec90c22fc9e77170e985d6b18c1a68ae73ce43361a1ea5be9c14820f8db594ce713bbcf7a8a6540766f9f6d4a5974dd51a9510fb94040f57fde76
|
data/README.md
CHANGED
@@ -65,7 +65,7 @@ This library extends Active Job with a querying interface and the following sett
|
|
65
65
|
## Adapter Specifics
|
66
66
|
|
67
67
|
- **Resque**: Queue pausing is supported only if you have `resque-pause` installed in your project
|
68
|
-
- **Solid Queue**: Requires version >= 0.
|
68
|
+
- **Solid Queue**: Requires version >= 0.9.
|
69
69
|
|
70
70
|
## Advanced configuration
|
71
71
|
|
@@ -1,16 +1,2 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
* listed below.
|
4
|
-
*
|
5
|
-
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
-
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
|
7
|
-
*
|
8
|
-
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
|
9
|
-
* compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
|
10
|
-
* files in this directory. Styles in this file should be added after the last require_* statement.
|
11
|
-
* It is generally better to create a new file per style scope.
|
12
|
-
*
|
13
|
-
*= require_tree .
|
14
|
-
*= require_self
|
15
|
-
*/
|
16
|
-
|
1
|
+
@import url("./forms.css");
|
2
|
+
@import url("./jobs.css");
|
@@ -1,6 +1,14 @@
|
|
1
1
|
class MissionControl::Jobs::ApplicationController < MissionControl::Jobs.base_controller_class.constantize
|
2
|
+
ActionController::Base::MODULES.each do |mod|
|
3
|
+
include mod unless self < mod
|
4
|
+
end
|
5
|
+
|
2
6
|
layout "mission_control/jobs/application"
|
3
7
|
|
8
|
+
# Include helpers if not already included
|
9
|
+
helper MissionControl::Jobs::ApplicationHelper unless self < MissionControl::Jobs::ApplicationHelper
|
10
|
+
helper Importmap::ImportmapTagsHelper unless self < Importmap::ImportmapTagsHelper
|
11
|
+
|
4
12
|
include MissionControl::Jobs::ApplicationScoped, MissionControl::Jobs::NotFoundRedirections
|
5
13
|
include MissionControl::Jobs::AdapterFeatures
|
6
14
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
class MissionControl::Jobs::RecurringTask
|
2
2
|
include ActiveModel::Model
|
3
3
|
|
4
|
-
attr_accessor :id, :job_class_name, :arguments, :schedule, :last_enqueued_at
|
4
|
+
attr_accessor :id, :job_class_name, :command, :arguments, :schedule, :last_enqueued_at, :queue_name, :priority
|
5
5
|
|
6
6
|
def initialize(queue_adapter: ActiveJob::Base.queue_adapter, **kwargs)
|
7
7
|
@queue_adapter = queue_adapter
|
@@ -1,16 +1,37 @@
|
|
1
1
|
<table class="table">
|
2
2
|
<tbody>
|
3
|
-
|
4
|
-
<
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
<
|
10
|
-
|
3
|
+
<% if recurring_task.job_class_name.present? %>
|
4
|
+
<tr>
|
5
|
+
<th>Job class</th>
|
6
|
+
<td><%= recurring_task.job_class_name %></td>
|
7
|
+
</tr>
|
8
|
+
|
9
|
+
<tr>
|
10
|
+
<th>Arguments</th>
|
11
|
+
<td><div class="is-family-monospace"><%= recurring_task.arguments.join(",") %></div></td>
|
12
|
+
</tr>
|
13
|
+
<% elsif recurring_task.command.present? %>
|
14
|
+
<tr>
|
15
|
+
<th>Command</th>
|
16
|
+
<td><div class="is-family-monospace"><%= recurring_task.command %></div></td>
|
17
|
+
</tr>
|
18
|
+
<% end %>
|
19
|
+
|
11
20
|
<tr>
|
12
21
|
<th>Schedule</th>
|
13
22
|
<td><%= recurring_task.schedule %></td>
|
14
23
|
</tr>
|
24
|
+
<% if recurring_task.queue_name.present? %>
|
25
|
+
<tr>
|
26
|
+
<th>Queue</th>
|
27
|
+
<td><%= recurring_task.queue_name %></td>
|
28
|
+
</tr>
|
29
|
+
<% end %>
|
30
|
+
<% if recurring_task.priority.present? %>
|
31
|
+
<tr>
|
32
|
+
<th>Priority</th>
|
33
|
+
<td><%= recurring_task.priority %></td>
|
34
|
+
</tr>
|
35
|
+
<% end %>
|
15
36
|
</tbody>
|
16
37
|
</table>
|
@@ -3,10 +3,14 @@
|
|
3
3
|
<%= link_to recurring_task.id, application_recurring_task_path(@application, recurring_task.id) %>
|
4
4
|
</td>
|
5
5
|
<td>
|
6
|
-
|
6
|
+
<% if recurring_task.job_class_name.present? %>
|
7
|
+
<%= recurring_task.job_class_name %>
|
7
8
|
|
8
|
-
|
9
|
-
|
9
|
+
<% if recurring_task.arguments.present? %>
|
10
|
+
<div class="is-family-monospace"><%= recurring_task.arguments.join(",") %></div>
|
11
|
+
<% end %>
|
12
|
+
<% elsif recurring_task.command.present? %>
|
13
|
+
<div class="is-family-monospace"><%= recurring_task.command %></div>
|
10
14
|
<% end %>
|
11
15
|
</td>
|
12
16
|
<td> <%= recurring_task.schedule %> </td>
|
@@ -25,8 +25,11 @@ module ActiveJob::QueueAdapters::SolidQueueExt::RecurringTasks
|
|
25
25
|
{
|
26
26
|
id: task.key,
|
27
27
|
job_class_name: task.class_name,
|
28
|
+
command: task.command,
|
28
29
|
arguments: task.arguments,
|
29
|
-
schedule: task.schedule
|
30
|
+
schedule: task.schedule,
|
31
|
+
queue_name: task.queue_name,
|
32
|
+
priority: task.priority
|
30
33
|
}
|
31
34
|
end
|
32
35
|
|
@@ -4,12 +4,15 @@ require "mission_control/jobs/engine"
|
|
4
4
|
require "importmap-rails"
|
5
5
|
require "turbo-rails"
|
6
6
|
require "stimulus-rails"
|
7
|
+
require "propshaft"
|
7
8
|
|
8
9
|
module MissionControl
|
9
10
|
module Jobs
|
10
11
|
class Engine < ::Rails::Engine
|
11
12
|
isolate_namespace MissionControl::Jobs
|
12
13
|
|
14
|
+
config.middleware.use ActionDispatch::Flash unless config.action_dispatch.flash
|
15
|
+
|
13
16
|
config.mission_control = ActiveSupport::OrderedOptions.new unless config.try(:mission_control)
|
14
17
|
config.mission_control.jobs = ActiveSupport::OrderedOptions.new
|
15
18
|
|
@@ -87,6 +90,7 @@ module MissionControl
|
|
87
90
|
end
|
88
91
|
|
89
92
|
initializer "mission_control-jobs.assets" do |app|
|
93
|
+
app.config.assets.paths << root.join("app/assets/stylesheets")
|
90
94
|
app.config.assets.paths << root.join("app/javascript")
|
91
95
|
app.config.assets.precompile += %w[ mission_control_jobs_manifest ]
|
92
96
|
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.3.
|
4
|
+
version: 0.3.2
|
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-
|
11
|
+
date: 2024-10-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '7.1'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: propshaft
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: importmap-rails
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,14 +114,14 @@ dependencies:
|
|
100
114
|
requirements:
|
101
115
|
- - ">="
|
102
116
|
- !ruby/object:Gem::Version
|
103
|
-
version: '0.
|
117
|
+
version: '0.9'
|
104
118
|
type: :development
|
105
119
|
prerelease: false
|
106
120
|
version_requirements: !ruby/object:Gem::Requirement
|
107
121
|
requirements:
|
108
122
|
- - ">="
|
109
123
|
- !ruby/object:Gem::Version
|
110
|
-
version: '0.
|
124
|
+
version: '0.9'
|
111
125
|
- !ruby/object:Gem::Dependency
|
112
126
|
name: selenium-webdriver
|
113
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -286,7 +300,6 @@ files:
|
|
286
300
|
- MIT-LICENSE
|
287
301
|
- README.md
|
288
302
|
- Rakefile
|
289
|
-
- app/assets/config/mission_control_jobs_manifest.js
|
290
303
|
- app/assets/stylesheets/mission_control/jobs/application.css
|
291
304
|
- app/assets/stylesheets/mission_control/jobs/forms.css
|
292
305
|
- app/assets/stylesheets/mission_control/jobs/jobs.css
|