|
@ -82,6 +82,22 @@ namespace :mastodon do |
|
|
end |
|
|
end |
|
|
end |
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
namespace :settings do |
|
|
|
|
|
desc 'Open registrations on this instance' |
|
|
|
|
|
task open_registrations: :environment do |
|
|
|
|
|
setting = Setting.where(var: 'open_registrations').first |
|
|
|
|
|
setting.value = true |
|
|
|
|
|
setting.save |
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
desc 'Close registrations on this instance' |
|
|
|
|
|
task close_registrations: :environment do |
|
|
|
|
|
setting = Setting.where(var: 'open_registrations').first |
|
|
|
|
|
setting.value = false |
|
|
|
|
|
setting.save |
|
|
|
|
|
end |
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
namespace :maintenance do |
|
|
namespace :maintenance do |
|
|
desc 'Update counter caches' |
|
|
desc 'Update counter caches' |
|
|
task update_counter_caches: :environment do |
|
|
task update_counter_caches: :environment do |
|
|