20200508212852_reset_unique_jobs_locks.rb 374 B

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