diff --git a/Gemfile.lock b/Gemfile.lock index b0434c1c..8b710211 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -117,7 +117,7 @@ GEM erubi (1.12.0) et-orbi (1.2.11) tzinfo - fugit (1.11.0) + fugit (1.11.1) et-orbi (~> 1, >= 1.2.11) raabro (~> 1.4) globalid (1.2.1) diff --git a/app/models/mission_control/jobs/recurring_task.rb b/app/models/mission_control/jobs/recurring_task.rb index aa601731..93fd2b6d 100644 --- a/app/models/mission_control/jobs/recurring_task.rb +++ b/app/models/mission_control/jobs/recurring_task.rb @@ -1,7 +1,7 @@ class MissionControl::Jobs::RecurringTask include ActiveModel::Model - attr_accessor :id, :job_class_name, :arguments, :schedule, :last_enqueued_at + attr_accessor :id, :job_class_name, :command, :arguments, :schedule, :last_enqueued_at, :queue_name, :priority def initialize(queue_adapter: ActiveJob::Base.queue_adapter, **kwargs) @queue_adapter = queue_adapter diff --git a/app/views/mission_control/jobs/recurring_tasks/_general_information.html.erb b/app/views/mission_control/jobs/recurring_tasks/_general_information.html.erb index a234414c..2b8c3980 100644 --- a/app/views/mission_control/jobs/recurring_tasks/_general_information.html.erb +++ b/app/views/mission_control/jobs/recurring_tasks/_general_information.html.erb @@ -1,16 +1,37 @@ - - - - - - - - + <% if recurring_task.job_class_name.present? %> + + + + + + + + + + <% elsif recurring_task.command.present? %> + + + + + <% end %> + + <% if recurring_task.queue_name.present? %> + + + + + <% end %> + <% if recurring_task.priority.present? %> + + + + + <% end %>
Job class<%= recurring_task.job_class_name %>
Arguments
<%= recurring_task.arguments.join(",") %>
Job class<%= recurring_task.job_class_name %>
Arguments
<%= recurring_task.arguments.join(",") %>
Command
<%= recurring_task.command %>
Schedule <%= recurring_task.schedule %>
Queue<%= recurring_task.queue_name %>
Priority<%= recurring_task.priority %>
diff --git a/app/views/mission_control/jobs/recurring_tasks/_recurring_task.html.erb b/app/views/mission_control/jobs/recurring_tasks/_recurring_task.html.erb index dfa07bcf..c7d3204b 100644 --- a/app/views/mission_control/jobs/recurring_tasks/_recurring_task.html.erb +++ b/app/views/mission_control/jobs/recurring_tasks/_recurring_task.html.erb @@ -3,10 +3,14 @@ <%= link_to recurring_task.id, application_recurring_task_path(@application, recurring_task.id) %> - <%= link_to recurring_task.job_class_name, application_recurring_task_path(@application, recurring_task.id) %> + <% if recurring_task.job_class_name.present? %> + <%= recurring_task.job_class_name %> - <% if recurring_task.arguments.present? %> -
<%= recurring_task.arguments.join(",") %>
+ <% if recurring_task.arguments.present? %> +
<%= recurring_task.arguments.join(",") %>
+ <% end %> + <% elsif recurring_task.command.present? %> +
<%= recurring_task.command %>
<% end %> <%= recurring_task.schedule %> diff --git a/lib/active_job/queue_adapters/solid_queue_ext/recurring_tasks.rb b/lib/active_job/queue_adapters/solid_queue_ext/recurring_tasks.rb index 4d40b456..864a9132 100644 --- a/lib/active_job/queue_adapters/solid_queue_ext/recurring_tasks.rb +++ b/lib/active_job/queue_adapters/solid_queue_ext/recurring_tasks.rb @@ -25,8 +25,11 @@ def recurring_task_attributes_from_solid_queue_recurring_task(task) { id: task.key, job_class_name: task.class_name, + command: task.command, arguments: task.arguments, - schedule: task.schedule + schedule: task.schedule, + queue_name: task.queue_name, + priority: task.priority } end diff --git a/mission_control-jobs.gemspec b/mission_control-jobs.gemspec index 1611e53b..9b886316 100644 --- a/mission_control-jobs.gemspec +++ b/mission_control-jobs.gemspec @@ -24,7 +24,7 @@ Gem::Specification.new do |spec| spec.add_dependency "irb", "~> 1.13" spec.add_development_dependency "resque" - spec.add_development_dependency "solid_queue", ">= 0.5" + spec.add_development_dependency "solid_queue", ">= 0.9" spec.add_development_dependency "selenium-webdriver" spec.add_development_dependency "resque-pause" spec.add_development_dependency "mocha"