Remove deprecation warnings, rename api:deprecate to api:tidy
parent
e8bf8e3587
commit
84a18ffde6
|
@ -1,8 +1,7 @@
|
||||||
class InactivityMailer < ApplicationMailer
|
class InactivityMailer < ApplicationMailer
|
||||||
attr_reader :user
|
attr_reader :user
|
||||||
|
SUBJECT = "[ACTION REQUIRED] Your FarmBot account " \
|
||||||
SUBJECT = "Your FarmBot account will be deleted "\
|
"will be deleted due to inactivity unless you login"
|
||||||
"due to inactivity unless you login"
|
|
||||||
ORDER = { 1 => "First", 2 => "Second", 3 => "Final" }
|
ORDER = { 1 => "First", 2 => "Second", 3 => "Final" }
|
||||||
|
|
||||||
def send_warning(user)
|
def send_warning(user)
|
||||||
|
|
|
@ -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
|
# 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
|
# would). To simplify setup for self-hosters, we perform magic in the background
|
||||||
# that converts ENV vars into config files. - RC
|
# that converts ENV vars into config files. - RC
|
||||||
|
|
|
@ -108,8 +108,7 @@ namespace :api do
|
||||||
TIMESTAMP = "created_at"
|
TIMESTAMP = "created_at"
|
||||||
PRERELEASE = "prerelease"
|
PRERELEASE = "prerelease"
|
||||||
|
|
||||||
desc "Update GlobalConfig to deprecate old FBOS versions"
|
def deprecate!
|
||||||
task deprecate: :environment do
|
|
||||||
# Get current version
|
# Get current version
|
||||||
version_str = GlobalConfig.dump.fetch("FBOS_END_OF_LIFE_VERSION")
|
version_str = GlobalConfig.dump.fetch("FBOS_END_OF_LIFE_VERSION")
|
||||||
# Convert it to Gem::Version for easy comparisons (>, <, ==, etc)
|
# Convert it to Gem::Version for easy comparisons (>, <, ==, etc)
|
||||||
|
@ -144,5 +143,11 @@ namespace :api do
|
||||||
.update!(value: data.to_s)
|
.update!(value: data.to_s)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
desc "Deprecate old FBOS version, delete inactive accounts, etc.."
|
||||||
|
task tidy: :environment do
|
||||||
|
deprecate!
|
||||||
|
InactiveAccountJob.perform_later
|
||||||
|
end
|
||||||
end
|
end
|
||||||
Rake::Task["assets:precompile"].enhance ["api:parcel_compile"]
|
Rake::Task["assets:precompile"].enhance ["api:parcel_compile"]
|
||||||
|
|
Loading…
Reference in New Issue