Redirect dead bookmarks to archive.org

This commit is contained in:
2023-11-18 14:31:03 +11:00
parent fae1fc092e
commit 9d6beadcd9
3 changed files with 5 additions and 5 deletions

View File

@@ -8,10 +8,10 @@ module Admin
Que.connection = Adamantium::Container["persistence.db"]
res.status = 200
if Que.job_stats.any? { |job| job[:job_class] == Adamantium::Jobs::RemoveDeadBookmarks.name }
if Que.job_stats.any? { |job| job[:job_class] == Adamantium::Jobs::ArchiveDeadBookmarks.name }
res.body = "Job already queued"
else
Adamantium::Jobs::RemoveDeadBookmarks.enqueue
Adamantium::Jobs::ArchiveDeadBookmarks.enqueue
res.body = "#{Que.job_stats.count} job queued"
end
end