clean(flipper): remove unused gates

This commit is contained in:
simon lehericey 2022-11-28 22:09:37 +01:00 committed by LeSim
parent ebd68484df
commit 905e3ab64e
2 changed files with 22 additions and 1 deletions

View file

@ -17,7 +17,6 @@ features = [
:dossier_pdf_vide,
:expert_not_allowed_to_invite,
:hide_instructeur_email,
:procedure_revisions,
:procedure_routage_api
]

View file

@ -0,0 +1,22 @@
namespace :after_party do
desc 'Deployment task: clean_old_gates'
task clean_old_gates: :environment do
puts "Running deploy task 'clean_old_gates'"
[
'procedure_revisions',
'instructeur_bypass_email_login_token',
'procedure_conditional',
'admin_affect_experts_to_avis'
].each do |key|
Flipper::Adapters::ActiveRecord::Gate.where(feature_key: key).destroy_all
end
# Put your task implementation HERE.
# Update task as completed. If you remove the line below, the task will
# run with every deploy (or every time you call after_party:run).
AfterParty::TaskRecord
.create version: AfterParty::TaskRecorder.new(__FILE__).timestamp
end
end