20200508212852_reset_unique_jobs_locks.rb 365 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/tootsuite/mastodon/pull/13361
  6. SidekiqUniqueJobs::Digests.delete_by_pattern('*', count: SidekiqUniqueJobs::Digests.count)
  7. end
  8. def down; end
  9. end