mirror of
https://github.com/manyfold3d/manyfold.git
synced 2026-10-22 11:42:19 -05:00
18 lines
552 B
Ruby
18 lines
552 B
Ruby
class ActivityController < ApplicationController
|
|
before_action { authorize :activity }
|
|
|
|
after_action :verify_authorized
|
|
skip_after_action :verify_policy_scoped, only: :index
|
|
|
|
EXCLUSIONS = [
|
|
"CacheSweepJob",
|
|
"DownloadsSweepJob"
|
|
]
|
|
|
|
def index
|
|
@jobs = ActiveJob::Status.all.sort_by { |it| it.last_activity || "" }.reverse # rubocop:disable Pundit/UsePolicyScope
|
|
@jobs.reject! { |it| EXCLUSIONS.include? it.read.dig(:serialized_job, "job_class") }
|
|
@jobs = Kaminari.paginate_array(@jobs).page(params[:page]).per(50)
|
|
end
|
|
end
|