diff options
author | ThibG <thib@sitedethib.com> | 2020-05-13 23:46:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-13 23:46:09 +0200 |
commit | e1d282023432ff4a88cb795f3a9889704314e448 (patch) | |
tree | 89f9525142d0bf876a4fb6e0117163c0a76bb78a /db/migrate/20200508212852_reset_unique_jobs_locks.rb | |
parent | c6ff4c634caf718adf7280e04909c091d15add1d (diff) | |
parent | d147dd7588502f22ac825780bb1d6e54eb3613e6 (diff) |
Merge pull request #1327 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'db/migrate/20200508212852_reset_unique_jobs_locks.rb')
-rw-r--r-- | db/migrate/20200508212852_reset_unique_jobs_locks.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/db/migrate/20200508212852_reset_unique_jobs_locks.rb b/db/migrate/20200508212852_reset_unique_jobs_locks.rb new file mode 100644 index 000000000..3ffdeb0aa --- /dev/null +++ b/db/migrate/20200508212852_reset_unique_jobs_locks.rb @@ -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 |