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