jobs: show retried jobs in /jobs listing.
Fix the /jobs listing to show retried jobs. GoodJob::ActiveJobJob has a default scope that filters out retried jobs; remove it in the index controller so we can see retried jobs. Also fix mail delivery jobs not showing up in the dropdown in the /jobs search form.
This commit is contained in:
@@ -4,7 +4,7 @@ class JobsController < ApplicationController
|
|||||||
respond_to :html, :xml, :json, :js
|
respond_to :html, :xml, :json, :js
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@jobs = authorize BackgroundJob.paginated_search(params)
|
@jobs = authorize BackgroundJob.unscoped.paginated_search(params)
|
||||||
respond_with(@jobs)
|
respond_with(@jobs)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ class ApplicationJob < ActiveJob::Base
|
|||||||
RegeneratePostJob, RetireTagRelationshipsJob,
|
RegeneratePostJob, RetireTagRelationshipsJob,
|
||||||
UploadPreprocessorDelayedStartJob, UploadServiceDelayedStartJob,
|
UploadPreprocessorDelayedStartJob, UploadServiceDelayedStartJob,
|
||||||
VacuumDatabaseJob, DiscordNotificationJob, BigqueryExportJob,
|
VacuumDatabaseJob, DiscordNotificationJob, BigqueryExportJob,
|
||||||
ProcessBulkUpdateRequestJob, PruneJobsJob
|
ProcessBulkUpdateRequestJob, PruneJobsJob, ActionMailer::MailDeliveryJob
|
||||||
]
|
]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ class BackgroundJob < GoodJob::ActiveJobJob
|
|||||||
end
|
end
|
||||||
|
|
||||||
def name_matches(name)
|
def name_matches(name)
|
||||||
class_name = name.tr(" ", "_").camelize + "Job"
|
class_name = name.tr(" ", "_").classify + "Job"
|
||||||
where_json_contains(:serialized_params, { job_class: class_name })
|
where_json_contains(:serialized_params, { job_class: class_name })
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user