removed obsolete after_party tasks

They no longer work on fresh database
This commit is contained in:
maatinito 2020-03-17 17:05:44 -10:00 committed by Pierre de La Morinerie
parent ebac24e390
commit d56635ebb1
4 changed files with 0 additions and 95 deletions

View file

@ -1,18 +0,0 @@
namespace :after_party do
desc 'Deployment task: create_dummy_paths_for_archived_and_hidden_procedures'
task create_dummy_paths_for_archived_and_hidden_procedures: :environment do
rake_puts "Running deploy task 'create_dummy_paths_for_archived_procedures'"
Procedure.with_discarded.archivees.where(path: nil).each do |p|
p.update_column(:path, SecureRandom.uuid)
end
Procedure.hidden.where(path: nil).each do |p|
p.update_column(:path, SecureRandom.uuid)
end
# 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: '20190704133852'
end
end

View file

@ -1,28 +0,0 @@
namespace :after_party do
desc 'Deployment task: migrate_geo_area_data'
task migrate_geo_area_data: :environment do
rake_puts "Running deploy task 'migrate_geo_area_data'"
progress = ProgressReport.new(Champs::CarteChamp.count)
Champs::CarteChamp.includes(:geo_areas).find_each do |champ|
geo_area = champ.geo_areas.find(&:selection_utilisateur?)
geo_json = champ.geo_json_from_value
if geo_area.blank? && geo_json.present?
GeoArea.create(
champ: champ,
geometry: geo_json,
source: GeoArea.sources.fetch(:selection_utilisateur)
)
progress.inc
end
end
progress.finish
# 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: '20190731152733'
end
end

View file

@ -1,33 +0,0 @@
namespace :after_party do
desc 'Deployment task: migrate_flipflop_to_flipper'
task migrate_flipflop_to_flipper: :environment do
rake_puts "Running deploy task 'migrate_flipflop_to_flipper'"
Instructeur.includes(:user).find_each do |instructeur|
if instructeur.features['download_as_zip_enabled']
pp "enable :instructeur_download_as_zip for #{instructeur.user.email}"
Flipper.enable_actor(:instructeur_download_as_zip, instructeur.user)
end
if instructeur.features['bypass_email_login_token']
pp "enable :instructeur_bypass_email_login_token for #{instructeur.user.email}"
Flipper.enable_actor(:instructeur_bypass_email_login_token, instructeur.user)
end
end
Administrateur.includes(:user).find_each do |administrateur|
if administrateur.features['web_hook']
pp "enable :administrateur_web_hook for #{administrateur.user.email}"
Flipper.enable_actor(:administrateur_web_hook, administrateur.user)
end
if administrateur.features['champ_integer_number']
pp "enable :administrateur_champ_integer_number for #{administrateur.user.email}"
Flipper.enable_actor(:administrateur_champ_integer_number, administrateur.user)
end
end
# 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: '20190829065022'
end
end

View file

@ -1,16 +0,0 @@
namespace :after_party do
desc 'Deployment task: backfill_daily_email_notification_columns'
task backfill_daily_email_notification_columns: :environment do
puts "Running deploy task 'backfill_daily_email_notification_columns'"
AssignTo.find_each do |assign_to|
columns_to_update = {}
if assign_to.email_notifications_enabled != assign_to.daily_email_notifications_enabled
columns_to_update[:daily_email_notifications_enabled] = assign_to.email_notifications_enabled
end
assign_to.update_columns(columns_to_update) unless columns_to_update.empty?
end
# 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: '20200220142710'
end # task :backfill_daily_email_notification_columns
end # namespace :after_party