forked from mirrors/catstodon
Add sidekiq_unique_jobs:delete_all_locks
task and disable sidekiq-unique-jobs
UI by default (#29199)
This commit is contained in:
parent
eae436c5a8
commit
3c3ef8b9d3
2 changed files with 12 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'sidekiq_unique_jobs/web'
|
require 'sidekiq_unique_jobs/web' if ENV['ENABLE_SIDEKIQ_UNIQUE_JOBS_UI'] == true
|
||||||
require 'sidekiq-scheduler/web'
|
require 'sidekiq-scheduler/web'
|
||||||
|
|
||||||
class RedirectWithVary < ActionDispatch::Routing::PathRedirect
|
class RedirectWithVary < ActionDispatch::Routing::PathRedirect
|
||||||
|
|
11
lib/tasks/sidekiq_unique_jobs.rake
Normal file
11
lib/tasks/sidekiq_unique_jobs.rake
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
namespace :sidekiq_unique_jobs do
|
||||||
|
task delete_all_locks: :environment do
|
||||||
|
digests = SidekiqUniqueJobs::Digests.new
|
||||||
|
digests.delete_by_pattern('*', count: digests.count)
|
||||||
|
|
||||||
|
expiring_digests = SidekiqUniqueJobs::ExpiringDigests.new
|
||||||
|
expiring_digests.delete_by_pattern('*', count: expiring_digests.count)
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in a new issue