Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Commit

Permalink
Fix old unique jobs digests not having been cleaned up (mastodon#13683)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gargron authored May 9, 2020
1 parent 66fa9f0 commit 38b6951
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions db/migrate/20200508212852_reset_unique_jobs_locks.rb
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 2020_04_17_125749) do
ActiveRecord::Schema.define(version: 2020_05_08_212852) do

# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
Expand Down

0 comments on commit 38b6951

Please sign in to comment.