Sha256: d9c41a6d86d97cc98f569512c7cd089a2fbca09cb7e95fb7ffd76ee9099a89db
Contents?: true
Size: 779 Bytes
Versions: 24
Compression:
Stored size: 779 Bytes
Contents
# frozen_string_literal: true # # Manage access to delayed job workers # module CoreDelayedJobMetricsController include CoreController # # Show a list of workers currently in the system # def index authorize! :read, Delayed::Jobs::Metric @metrics = Delayed::Jobs::Metric.all end # # Destroy the selected delayed job worker # def destroy authorize! :manage, delayed_job_metric delayed_job_metric.destroy! flash.now[:info] = 'Delayed Job Metric has been destroyed' redirect_to index_path rescue StandardError => error log_controller_error error, true redirect_to index_path end # # Fetch the required job by id # def delayed_job_metric @delayed_job_metric ||= Delayed::Jobs::Metric.find(params[:id]) end end
Version data entries
24 entries across 24 versions & 1 rubygems