Remove deprecation warnings, rename api:deprecate to api:tidy

pull/1579/head
Rick Carlino 2019-11-21 13:57:19 -06:00
parent e8bf8e3587
commit 84a18ffde6
3 changed files with 10 additions and 5 deletions

View File

@ -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)

View File

@ -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

View File

@ -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"]