about summary refs log blame commit diff
path: root/db/migrate/20200508212852_reset_unique_jobs_locks.rb
blob: d717ffc547f71d51eea4ab7d1420192320a76f75 (plain) (tree)
1
2
3
4
5
6
7
8



                                                                      
                                                                          
 
                                                                         


               
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/mastodon/mastodon/pull/13361

    until SidekiqUniqueJobs::Digests.new.delete_by_pattern('*').nil?; end
  end

  def down; end
end