Skip to content

Commit

Permalink
Merge pull request #165 from christopher-b/next-run
Browse files Browse the repository at this point in the history
Add "Next run" column to recurring tasks index
  • Loading branch information
rosa authored Nov 5, 2024
2 parents 8d29af2 + ecd58a9 commit 6f94696
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/mission_control/jobs/recurring_task.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class MissionControl::Jobs::RecurringTask
include ActiveModel::Model

attr_accessor :id, :job_class_name, :command, :arguments, :schedule, :last_enqueued_at, :queue_name, :priority
attr_accessor :id, :job_class_name, :command, :arguments, :schedule, :last_enqueued_at, :next_time, :queue_name, :priority

def initialize(queue_adapter: ActiveJob::Base.queue_adapter, **kwargs)
@queue_adapter = queue_adapter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@
</td>
<td> <%= recurring_task.schedule %> </td>
<td><div class="has-text-grey"><%= recurring_task.last_enqueued_at ? formatted_time(recurring_task.last_enqueued_at) : "Never" %></div></td>
<td class="next_time"><div class="has-text-grey"><%= formatted_time(recurring_task.next_time) %></div></td>
</tr>
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<th>Job</th>
<th>Schedule</th>
<th>Last enqueued at</th>
<th>Next run</th>
</tr>
</thead>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def recurring_task_attributes_from_solid_queue_recurring_task(task)
command: task.command,
arguments: task.arguments,
schedule: task.schedule,
next_time: task.next_time,
queue_name: task.queue_name,
priority: task.priority
}
Expand Down

0 comments on commit 6f94696

Please sign in to comment.