Improved migration and changed wording.
This commit is contained in:
parent
1ce2b12438
commit
7248be908f
4 changed files with 12 additions and 6 deletions
|
@ -35,11 +35,11 @@
|
|||
<% end %>
|
||||
</ul>
|
||||
<% if !_.isEmpty(@data.issues): %>
|
||||
<button class="btn btn--primary js-restartFailedJobs"><%- @T('Restart Failed Jobs') %></button>
|
||||
<button class="btn btn--primary js-restartFailedJobs"><%- @T('Restart failed jobs') %></button>
|
||||
<% if !_.isUndefined(@job_restart_count): %>
|
||||
<p>
|
||||
<%- @T('Detected %s failed job(s) available for restart', @job_restart_count) %>
|
||||
<%- ', restarting...' if @job_restart_count > 0 %>
|
||||
<%- @T('%s failed job(s) marked for restart', @job_restart_count) %>
|
||||
<%- @T(', restarting...') if @job_restart_count > 0 %>
|
||||
</p>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
|
|
@ -82,7 +82,7 @@ curl http://localhost/api/v1/monitoring/health_check?token=XXX
|
|||
end
|
||||
|
||||
Scheduler.where(status: 'error').each do |scheduler|
|
||||
issues.push "Failed to run scheduled job \'#{scheduler.name}\'. Cause: #{scheduler.error_message}"
|
||||
issues.push "Failed to run scheduled job '#{scheduler.name}'. Cause: #{scheduler.error_message}"
|
||||
end
|
||||
|
||||
token = Setting.get('monitoring_token')
|
||||
|
|
|
@ -514,6 +514,8 @@ class CreateBase < ActiveRecord::Migration
|
|||
t.integer :prio, null: false
|
||||
t.string :pid, limit: 250, null: true
|
||||
t.string :note, limit: 250, null: true
|
||||
t.string :error_message, null: true
|
||||
t.string :status, null: true
|
||||
t.boolean :active, null: false, default: false
|
||||
t.integer :updated_by_id, null: false
|
||||
t.integer :created_by_id, null: false
|
||||
|
|
|
@ -1,8 +1,12 @@
|
|||
class SchedulerStatus < ActiveRecord::Migration[4.2]
|
||||
def up
|
||||
|
||||
# return if it's a new setup
|
||||
return if !Setting.find_by(name: 'system_init_done')
|
||||
|
||||
change_table :schedulers do |t|
|
||||
t.string :error_message
|
||||
t.string :status
|
||||
t.string :error_message, null: true
|
||||
t.string :status, null: true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue