-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
103 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
source "https://rubygems.org" | ||
git_source(:github) { |repo| "https://github.com/#{repo}.git" } | ||
git_source(:bc) { |repo| "https://github.com/basecamp/#{repo}" } | ||
|
||
# Specify your gem's dependencies in mission_control-jobs.gemspec. | ||
gemspec | ||
|
||
gem "solid_queue", github: "rails/solid_queue", branch: "improve-recurring-tasks-config" | ||
|
||
gem "capybara", github: "teamcapybara/capybara" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 29 additions & 8 deletions
37
app/views/mission_control/jobs/recurring_tasks/_general_information.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,37 @@ | ||
<table class="table"> | ||
<tbody> | ||
<tr> | ||
<th>Job class</th> | ||
<td><%= recurring_task.job_class_name %></td> | ||
</tr> | ||
<tr> | ||
<th>Arguments</th> | ||
<td><div class="is-family-monospace"><%= recurring_task.arguments.join(",") %></div></td> | ||
</tr> | ||
<% if recurring_task.job_class_name.present? %> | ||
<tr> | ||
<th>Job class</th> | ||
<td><%= recurring_task.job_class_name %></td> | ||
</tr> | ||
|
||
<tr> | ||
<th>Arguments</th> | ||
<td><div class="is-family-monospace"><%= recurring_task.arguments.join(",") %></div></td> | ||
</tr> | ||
<% elsif recurring_task.command.present? %> | ||
<tr> | ||
<th>Command</th> | ||
<td><div class="is-family-monospace"><%= recurring_task.command %></div></td> | ||
</tr> | ||
<% end %> | ||
|
||
<tr> | ||
<th>Schedule</th> | ||
<td><%= recurring_task.schedule %></td> | ||
</tr> | ||
<% if recurring_task.queue_name.present? %> | ||
<tr> | ||
<th>Queue</th> | ||
<td><%= recurring_task.queue_name %></td> | ||
</tr> | ||
<% end %> | ||
<% if recurring_task.priority.present? %> | ||
<tr> | ||
<th>Priority</th> | ||
<td><%= recurring_task.priority %></td> | ||
</tr> | ||
<% end %> | ||
</tbody> | ||
</table> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
test/dummy/db/migrate/20240909204134_add_name_to_processes.solid_queue.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# This migration comes from solid_queue (originally 20240811173327) | ||
class AddNameToProcesses < ActiveRecord::Migration[7.1] | ||
def change | ||
add_column :solid_queue_processes, :name, :string | ||
end | ||
end |
17 changes: 17 additions & 0 deletions
17
test/dummy/db/migrate/20240909204135_make_name_not_null.solid_queue.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# This migration comes from solid_queue (originally 20240813160053) | ||
class MakeNameNotNull < ActiveRecord::Migration[7.1] | ||
def up | ||
SolidQueue::Process.where(name: nil).find_each do |process| | ||
process.name ||= [ process.kind.downcase, SecureRandom.hex(10) ].join("-") | ||
process.save! | ||
end | ||
|
||
change_column :solid_queue_processes, :name, :string, null: false | ||
add_index :solid_queue_processes, [ :name, :supervisor_id ], unique: true | ||
end | ||
|
||
def down | ||
remove_index :solid_queue_processes, [ :name, :supervisor_id ] | ||
change_column :solid_queue_processes, :name, :string, null: true | ||
end | ||
end |
6 changes: 6 additions & 0 deletions
6
...grate/20240909204136_change_solid_queue_recurring_tasks_static_to_not_null.solid_queue.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# This migration comes from solid_queue (originally 20240819165045) | ||
class ChangeSolidQueueRecurringTasksStaticToNotNull < ActiveRecord::Migration[7.1] | ||
def change | ||
change_column_null :solid_queue_recurring_tasks, :static, false, true | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters