mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 15:48:43 -05:00
Sort schedules by "next run due" time
This commit is contained in:
parent
14018ec07c
commit
fad80bbee3
1 changed files with 3 additions and 1 deletions
|
@ -5,8 +5,10 @@ module Scheduler
|
|||
|
||||
def self.registered(app)
|
||||
app.get "/scheduler" do
|
||||
@schedules = Scheduler::Manager.discover_schedules
|
||||
@manager = Scheduler::Manager.without_runner
|
||||
@schedules = Scheduler::Manager.discover_schedules.sort do |a,b|
|
||||
a.schedule_info.next_run <=> b.schedule_info.next_run
|
||||
end
|
||||
erb File.read(File.join(VIEWS, 'scheduler.erb')), locals: {view_path: VIEWS}
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue