diff --git a/app/mailers/inactivity_mailer.rb b/app/mailers/inactivity_mailer.rb index 205686e6f..d9b3e0f73 100644 --- a/app/mailers/inactivity_mailer.rb +++ b/app/mailers/inactivity_mailer.rb @@ -1,8 +1,7 @@ class InactivityMailer < ApplicationMailer attr_reader :user - - SUBJECT = "Your FarmBot account will be deleted "\ - "due to inactivity unless you login" + SUBJECT = "[ACTION REQUIRED] Your FarmBot account " \ + "will be deleted due to inactivity unless you login" ORDER = { 1 => "First", 2 => "Second", 3 => "Final" } def send_warning(user) diff --git a/config/initializers/config_writers.rb b/config/initializers/config_writers.rb index 5de1b3401..be170c25f 100644 --- a/config/initializers/config_writers.rb +++ b/config/initializers/config_writers.rb @@ -1,3 +1,4 @@ +require_relative "../../app/lib/rmq_config_writer.rb" # Some services do not use ENV vars as the configuration mechanism (I wish they # would). To simplify setup for self-hosters, we perform magic in the background # that converts ENV vars into config files. - RC diff --git a/lib/tasks/api.rake b/lib/tasks/api.rake index 11550b7be..d4f36c0c4 100644 --- a/lib/tasks/api.rake +++ b/lib/tasks/api.rake @@ -108,8 +108,7 @@ namespace :api do TIMESTAMP = "created_at" PRERELEASE = "prerelease" - desc "Update GlobalConfig to deprecate old FBOS versions" - task deprecate: :environment do + def deprecate! # Get current version version_str = GlobalConfig.dump.fetch("FBOS_END_OF_LIFE_VERSION") # Convert it to Gem::Version for easy comparisons (>, <, ==, etc) @@ -144,5 +143,11 @@ namespace :api do .update!(value: data.to_s) end end + + desc "Deprecate old FBOS version, delete inactive accounts, etc.." + task tidy: :environment do + deprecate! + InactiveAccountJob.perform_later + end end Rake::Task["assets:precompile"].enhance ["api:parcel_compile"]