20200508212852_reset_unique_jobs_locks.rb 343 B

123456789101112
  1. class ResetUniqueJobsLocks < ActiveRecord::Migration[5.2]
  2. disable_ddl_transaction!
  3. def up
  4. # We do this to clean up unique job digests that were not properly
  5. # disposed of prior to https://github.com/mastodon/mastodon/pull/13361
  6. until SidekiqUniqueJobs::Digests.new.delete_by_pattern('*').nil?; end
  7. end
  8. def down; end
  9. end