Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove obsolete rake tasks #4999

Merged
merged 3 commits into from
Oct 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions app/mailers/dashboard/mailer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,6 @@ def forward(proposal)
mail to: proposal.author.email, subject: proposal.title
end

def new_actions_notification_rake_published(proposal, new_actions_ids)
@proposal = proposal
@new_actions = get_new_actions(new_actions_ids)
mail to: proposal.author.email,
subject: I18n.t("mailers.new_actions_notification_rake_published.subject")
end

def new_actions_notification_rake_created(proposal, new_actions_ids)
@proposal = proposal
@new_actions = get_new_actions(new_actions_ids)
mail to: proposal.author.email,
subject: I18n.t("mailers.new_actions_notification_rake_created.subject")
end

def new_actions_notification_on_create(proposal)
@proposal = proposal
mail to: proposal.author.email,
Expand Down

This file was deleted.

This file was deleted.

24 changes: 0 additions & 24 deletions config/locales/en/mailers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,30 +96,6 @@ en:
subject: "Machine Learning - Content has been generated successfully"
text: "Content has been generated successfully."
title: "Machine Learning script"
new_actions_notification_rake_created:
subject: "More news about your citizen proposal"
hi: "Hello %{name},"
new_resource: "NEW UNLOCKED RESOURCE"
introduction: "As you know, on the %{created_at_day} day of the %{created_at_month} you created the proposal in draft mode %{title}."
text_1: "Whenever you want you can publish on this link: %{link_to_published}. If you're still not sure..."
text_2: "Seize this moment! Learn, add other people with the same interests and prepare the diffusion that you will need when you publish your proposal definitively."
text_3: "And to accompany you in this challenge, here are the news..."
text_4: "Take a look at this NEW recommended ACTION:"
text_5: "The next action we recommend is:"
footer_text: "As always, enter the Proposals Panel and we will tell you in detail how to use these resources and how to get the most out of it."
dashboard_button: "Go ahead, discover them!"
new_actions_notification_rake_published:
subject: "More news about your citizen proposal"
hi: "Hello %{name},"
new_resource: "NEW UNLOCKED RESOURCE"
introduction: "As you know, on the %{published_at_day} day of the %{published_at_month} you published the proposal %{title}."
text_1: "Well, you've got %{votes_count} support so far Congratulations!"
text_2: "And so, you have a new resource available to help you keep moving forward."
text_3: "You are missing %{days_count} days before your proposal gets the %{max_votes_count} supports and goes to referendum. Cheer up and keep spreading. Are you short of ideas?"
text_4: "NEW RECOMMENDED DIFFUSION ACTION"
text_5: "There's more yet, see the following action:"
footer_text: "As always, enter the Proposals Panel and we will tell you in detail how to use these resources and how to get the most out of it."
dashboard_button: "Go ahead, discover them!"
new_actions_notification_on_create:
subject: "Your draft citizen proposal is created"
hi: "Hi %{name}!"
Expand Down
24 changes: 0 additions & 24 deletions config/locales/es/mailers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,30 +96,6 @@ es:
subject: "Machine learning - Contenido generado correctamente"
text: "El contenido ha sido generado correctamente."
title: "Script Machine Learning"
new_actions_notification_rake_created:
subject: "Más novedades de tu propuesta ciudadana"
hi: "Hola %{name},"
new_resource: "NUEVO RECURSO DESBLOQUEADO"
introduction: "Como sabes, el día %{created_at_day} del %{created_at_month} creaste la propuesta en modo borrador %{title}."
text_1: "Cuando quieras puedes publicar en este enlace: %{link_to_published}. Si aún no lo tienes claro…"
text_2: "¡aprovecha este momento! Aprende, suma a otras personas con los mismos intereses y prepara la difusión que necesitarás al publicar tu propuesta definitivamente."
text_3: "Y para acompañarte en este reto, aquí van las novedades..."
text_4: "Échale un vistazo a esta NUEVA ACCIÓN recomendada:"
text_5: "La siguiente acción que te recomendamos es:"
footer_text: "Como siempre, entra en el Panel de propuestas y te contamos detalladamente cómo utilizar estos recursos y cómo sacarle el máximo partido."
dashboard_button: "Adelante, ¡descúbrelos!"
new_actions_notification_rake_published:
subject: "Más novedades de tu propuesta ciudadana"
hi: "Hola %{name},"
new_resource: "NUEVO RECURSO DESBLOQUEADO"
introduction: "Como sabes, el día %{published_at_day} del %{published_at_month} publicaste la propuesta %{title}."
text_1: "Pues bien, has conseguido %{votes_count} apoyos hasta este momento ¡Felicidades!"
text_2: "Y por eso, tienes disponible un nuevo recurso para ayudarte a seguir avanzando."
text_3: "Te faltan %{days_count} días para que tu propuesta consiga los %{max_votes_count} apoyos y que vaya a referéndum. Ánimo y sigue difundiendo. ¿Te faltan ideas?"
text_4: "NUEVA ACCIÓN DE DIFUSIÓN RECOMENDADA"
text_5: "Aún hay más, consulta la siguiente acción:"
footer_text: "Como siempre, entra en el Panel de propuestas y te contamos detalladamente cómo utilizar estos recursos y cómo sacarle el máximo partido."
dashboard_button: "Adelante, ¡descúbrelos!"
new_actions_notification_on_create:
subject: "Tu borrador de propuesta ciudadana está creado"
hi: "Hola %{name}!"
Expand Down
5 changes: 0 additions & 5 deletions config/schedule.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@
rake "-s stats:generate"
end

# Temporally not send dashboard's notifications
# every 1.day, at: "7:00 am" do
# rake "dashboards:send_notifications"
# end

every 1.day, at: "1:00 am", roles: [:cron] do
rake "files:remove_old_cached_attachments"
end
Expand Down
9 changes: 0 additions & 9 deletions lib/tasks/active_storage.rake

This file was deleted.

5 changes: 0 additions & 5 deletions lib/tasks/consul.rake
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ namespace :consul do
"settings:add_new_settings",
"execute_release_1.6.0_tasks"]

desc "Runs tasks needed to upgrade from 1.4.0 to 1.5.0"
task "execute_release_1.5.0_tasks": [
"active_storage:remove_paperclip_compatibility_in_existing_attachments"
]

desc "Runs tasks needed to upgrade from 1.5.0 to 1.6.0"
task "execute_release_1.6.0_tasks": [
"db:calculate_tsv",
Expand Down
18 changes: 0 additions & 18 deletions lib/tasks/dashboards.rake

This file was deleted.

12 changes: 0 additions & 12 deletions lib/tasks/votes.rake
Original file line number Diff line number Diff line change
@@ -1,16 +1,4 @@
namespace :votes do
desc "Resets cached_votes_up counter to its latest value"
task reset_vote_counter: :environment do
models = [Proposal, Budget::Investment]

models.each do |model|
model.find_each do |resource|
resource.update_cached_votes
print "."
end
end
end

desc "Resets hot_score to its new value"
task reset_hot_score: :environment do
models = [Debate, Proposal, Legislation::Proposal]
Expand Down
67 changes: 0 additions & 67 deletions spec/lib/tasks/active_storage_spec.rb

This file was deleted.

Loading