solid_queue_monitor 2.2.1 → 2.3.0
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 +4 -4
- data/README.md +1 -1
- data/app/controllers/solid_queue_monitor/recurring_jobs_controller.rb +6 -0
- data/app/services/solid_queue_monitor/enqueue_recurring_task_service.rb +28 -0
- data/app/views/solid_queue_monitor/recurring_jobs/_row.html.erb +9 -0
- data/app/views/solid_queue_monitor/recurring_jobs/index.html.erb +2 -1
- data/config/routes.rb +3 -1
- data/lib/solid_queue_monitor/version.rb +1 -1
- metadata +7 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: af9fa2f3a2f500ec4220b2767d32d3e82ddcf4e73ae8086ec470d336d4713b4a
|
|
4
|
+
data.tar.gz: 49d05191bd4d4497025a43ac7e6faca22a6ab3d2fe7ee6e82fee537308b4479e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ba54a61e7d96da93a1363dbe196c6de713c8a88814965a9e2731aa8e44b4e35eedc05f69797bd7e5f5804f08a6e8c5481267deea9391eed647fe81cc10392e21
|
|
7
|
+
data.tar.gz: 1b78a10fbceefbf6dda5f5e64f6e733cd6add029d742265edade7e575ab4003aa8a3dc99b4879e5e2135f04a4060e24ea897bc083fb5af99e422a9f8f0dc42fc
|
data/README.md
CHANGED
|
@@ -238,7 +238,7 @@ The dashboard provides several views:
|
|
|
238
238
|
- **Overview**: Shows statistics, recent jobs, and job activity chart
|
|
239
239
|
- **Ready Jobs**: Jobs that are ready to be executed
|
|
240
240
|
- **Scheduled Jobs**: Jobs scheduled for future execution with execute and reject actions
|
|
241
|
-
- **Recurring Jobs**: Jobs that run on a recurring schedule
|
|
241
|
+
- **Recurring Jobs**: Jobs that run on a recurring schedule, with a Run now action that enqueues one task immediately without changing its schedule
|
|
242
242
|
- **Failed Jobs**: Jobs that have failed with error details and retry/discard actions
|
|
243
243
|
- **Queues**: Distribution of jobs across different queues with pause/resume controls
|
|
244
244
|
- **Workers**: Real-time monitoring of all Solid Queue processes with health status
|
|
@@ -12,5 +12,11 @@ module SolidQueueMonitor
|
|
|
12
12
|
@sort = sort_params
|
|
13
13
|
@action_path = recurring_jobs_path
|
|
14
14
|
end
|
|
15
|
+
|
|
16
|
+
def enqueue
|
|
17
|
+
result = SolidQueueMonitor::EnqueueRecurringTaskService.call(params[:id])
|
|
18
|
+
set_flash_message(result[:message], result[:success] ? 'success' : 'error')
|
|
19
|
+
redirect_to recurring_jobs_path
|
|
20
|
+
end
|
|
15
21
|
end
|
|
16
22
|
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module SolidQueueMonitor
|
|
4
|
+
class EnqueueRecurringTaskService
|
|
5
|
+
class << self
|
|
6
|
+
def call(id)
|
|
7
|
+
task = SolidQueue::RecurringTask.find(id)
|
|
8
|
+
enqueued_job = task.enqueue(at: Time.current)
|
|
9
|
+
|
|
10
|
+
if enqueued?(enqueued_job)
|
|
11
|
+
{ success: true, message: "Recurring task '#{task.key}' has been queued to run now" }
|
|
12
|
+
else
|
|
13
|
+
{ success: false, message: "Could not enqueue recurring task '#{task.key}'. It may already be queued for this time" }
|
|
14
|
+
end
|
|
15
|
+
rescue ActiveRecord::RecordNotFound
|
|
16
|
+
{ success: false, message: 'Recurring task not found' }
|
|
17
|
+
rescue StandardError => e
|
|
18
|
+
{ success: false, message: "Failed to enqueue recurring task: #{e.message}" }
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
private
|
|
22
|
+
|
|
23
|
+
def enqueued?(enqueued_job)
|
|
24
|
+
enqueued_job.respond_to?(:successfully_enqueued?) && enqueued_job.successfully_enqueued?
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -5,4 +5,13 @@
|
|
|
5
5
|
<td><%= queue_link(job.queue_name) %></td>
|
|
6
6
|
<td><%= job.priority || 'Default' %></td>
|
|
7
7
|
<td><%= format_datetime(job.updated_at) %></td>
|
|
8
|
+
<td class="actions-cell">
|
|
9
|
+
<form method="post"
|
|
10
|
+
action="<%= enqueue_recurring_job_path(job) %>"
|
|
11
|
+
class="inline-form"
|
|
12
|
+
data-confirm="Enqueue <%= job.key %> to run now? Its schedule will not change.">
|
|
13
|
+
<%= csrf_token_field_if_enabled %>
|
|
14
|
+
<button type="submit" class="action-button execute-button">Run now</button>
|
|
15
|
+
</form>
|
|
16
|
+
</td>
|
|
8
17
|
</tr>
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
{ sort_key: nil, label: 'Schedule' },
|
|
12
12
|
{ sort_key: :queue_name, label: 'Queue' },
|
|
13
13
|
{ sort_key: :priority, label: 'Priority' },
|
|
14
|
-
{ sort_key: nil, label: 'Last Updated' }
|
|
14
|
+
{ sort_key: nil, label: 'Last Updated' },
|
|
15
|
+
{ sort_key: nil, label: 'Actions' }
|
|
15
16
|
] %>
|
|
16
17
|
|
|
17
18
|
<%= render 'solid_queue_monitor/shared/jobs_table',
|
data/config/routes.rb
CHANGED
|
@@ -11,7 +11,9 @@ SolidQueueMonitor::Engine.routes.draw do
|
|
|
11
11
|
|
|
12
12
|
resources :ready_jobs, only: [:index]
|
|
13
13
|
resources :scheduled_jobs, only: [:index]
|
|
14
|
-
resources :recurring_jobs, only: [:index]
|
|
14
|
+
resources :recurring_jobs, only: [:index] do
|
|
15
|
+
post :enqueue, on: :member
|
|
16
|
+
end
|
|
15
17
|
resources :failed_jobs, only: [:index]
|
|
16
18
|
resources :in_progress_jobs, only: [:index]
|
|
17
19
|
resources :queues, only: [:index]
|
metadata
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: solid_queue_monitor
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Vishal Sadriya
|
|
8
|
+
autorequire:
|
|
8
9
|
bindir: bin
|
|
9
10
|
cert_chain: []
|
|
10
|
-
date:
|
|
11
|
+
date: 2026-10-21 00:00:00.000000000 Z
|
|
11
12
|
dependencies:
|
|
12
13
|
- !ruby/object:Gem::Dependency
|
|
13
14
|
name: rails
|
|
@@ -73,6 +74,7 @@ files:
|
|
|
73
74
|
- app/services/solid_queue_monitor/asset_cache.rb
|
|
74
75
|
- app/services/solid_queue_monitor/authentication_service.rb
|
|
75
76
|
- app/services/solid_queue_monitor/chart_data_service.rb
|
|
77
|
+
- app/services/solid_queue_monitor/enqueue_recurring_task_service.rb
|
|
76
78
|
- app/services/solid_queue_monitor/execute_job_service.rb
|
|
77
79
|
- app/services/solid_queue_monitor/failed_job_service.rb
|
|
78
80
|
- app/services/solid_queue_monitor/pagination_service.rb
|
|
@@ -145,6 +147,7 @@ metadata:
|
|
|
145
147
|
source_code_uri: https://github.com/vishaltps/solid_queue_monitor
|
|
146
148
|
changelog_uri: https://github.com/vishaltps/solid_queue_monitor/blob/main/CHANGELOG.md
|
|
147
149
|
rubygems_mfa_required: 'true'
|
|
150
|
+
post_install_message:
|
|
148
151
|
rdoc_options: []
|
|
149
152
|
require_paths:
|
|
150
153
|
- lib
|
|
@@ -159,7 +162,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
159
162
|
- !ruby/object:Gem::Version
|
|
160
163
|
version: '0'
|
|
161
164
|
requirements: []
|
|
162
|
-
rubygems_version:
|
|
165
|
+
rubygems_version: 3.5.22
|
|
166
|
+
signing_key:
|
|
163
167
|
specification_version: 4
|
|
164
168
|
summary: Simple monitoring interface for Solid Queue
|
|
165
169
|
test_files: []
|