mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +02:00
Basic delayed jobs queue display and rubocop fixes
This commit is contained in:
parent
c7b58d8b06
commit
f4ebbbdc95
5 changed files with 36 additions and 5 deletions
5
app/controllers/admin/delayed_jobs_controller.rb
Normal file
5
app/controllers/admin/delayed_jobs_controller.rb
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
class Admin::DelayedJobsController < AdminController
|
||||||
|
def index
|
||||||
|
@jobs = Delayed::Job.all
|
||||||
|
end
|
||||||
|
end
|
24
app/views/admin/delayed_jobs/index.haml
Normal file
24
app/views/admin/delayed_jobs/index.haml
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
.row
|
||||||
|
.col-sm-12
|
||||||
|
%h2.text-center-xs= t('shared.jobs')
|
||||||
|
|
||||||
|
%hr
|
||||||
|
.row
|
||||||
|
.col-md-12
|
||||||
|
.table-responsive
|
||||||
|
%table.table.table-hover.table-bordered.table-condensed
|
||||||
|
%thead
|
||||||
|
%tr
|
||||||
|
%th{class: 'col-xs-2'}= t('shared.priority')
|
||||||
|
%th{class: 'col-xs-2'}= t('shared.attempts')
|
||||||
|
%th{class: 'col-xs-2'}= t('shared.last_error')
|
||||||
|
%th{class: 'col-xs-1'}= t('shared.run_at')
|
||||||
|
%th{class: 'col-xs-1'}= t('shared.created_at')
|
||||||
|
%tbody
|
||||||
|
- @jobs.each do |job|
|
||||||
|
%tr
|
||||||
|
%td= job.priority
|
||||||
|
%td= job.attempts
|
||||||
|
%td= job.last_error
|
||||||
|
%td= job.run_at
|
||||||
|
%td= job.created_at
|
|
@ -47,6 +47,10 @@
|
||||||
%li
|
%li
|
||||||
= link_to t('shared.domains_history'), admin_domain_versions_path
|
= link_to t('shared.domains_history'), admin_domain_versions_path
|
||||||
|
|
||||||
|
%li
|
||||||
|
= link_to t('shared.jobs'), admin_delayed_jobs_path
|
||||||
|
|
||||||
|
|
||||||
%ul.nav.navbar-nav.navbar-right
|
%ul.nav.navbar-nav.navbar-right
|
||||||
%li= link_to t('shared.log_out', user: current_user), '/logout'
|
%li= link_to t('shared.log_out', user: current_user), '/logout'
|
||||||
/ /.nav-collapse
|
/ /.nav-collapse
|
||||||
|
|
|
@ -85,8 +85,8 @@ task deploy: :environment do
|
||||||
|
|
||||||
to :launch do
|
to :launch do
|
||||||
queue "mkdir -p #{deploy_to}/current/tmp; touch #{deploy_to}/current/tmp/restart.txt"
|
queue "mkdir -p #{deploy_to}/current/tmp; touch #{deploy_to}/current/tmp/restart.txt"
|
||||||
queue "RAILS_ENV=production bin/delayed_job stop"
|
queue 'RAILS_ENV=production bin/delayed_job stop'
|
||||||
queue "RAILS_ENV=production bin/delayed_job start"
|
queue 'RAILS_ENV=production bin/delayed_job start'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -27,11 +27,9 @@ Rails.application.routes.draw do
|
||||||
|
|
||||||
resources :users
|
resources :users
|
||||||
resources :epp_users
|
resources :epp_users
|
||||||
resources :contact_versions
|
|
||||||
resources :domain_versions
|
resources :domain_versions
|
||||||
|
|
||||||
resources :contact_histories
|
resources :delayed_jobs
|
||||||
resources :domain_histories
|
|
||||||
|
|
||||||
root 'domains#index'
|
root 'domains#index'
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue