Merge pull request #1579 from FarmBot/better_inactive
Remove deprecation warnings, rename api:deprecate to api:tidypull/1589/head
commit
fd867fca70
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"]
|
||||
|
|
Loading…
Reference in New Issue