Fix old unique jobs digests not having been cleaned up (#13683)

This commit is contained in:
Eugen Rochko
2020-05-09 18:37:39 +02:00
committed by GitHub
parent 66fa9f0a04
commit 38b69512ff
2 changed files with 13 additions and 1 deletions

View File

@ -0,0 +1,12 @@
class ResetUniqueJobsLocks < ActiveRecord::Migration[5.2]
disable_ddl_transaction!
def up
# We do this to clean up unique job digests that were not properly
# disposed of prior to https://github.com/tootsuite/mastodon/pull/13361
SidekiqUniqueJobs::Digests.delete_by_pattern('*', count: SidekiqUniqueJobs::Digests.count)
end
def down; end
end