mirror of
https://framagit.org/tykayn/mastodon.git
synced 2023-08-25 08:33:12 +02:00
Add task in order to delete unconfirmed users (older than 2days) (#1571)
* add task in order to delete unconfirmed user * change 7 days to 2
This commit is contained in:
parent
5cdd2c2414
commit
2f2b84bfbb
@ -75,6 +75,13 @@ namespace :mastodon do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
namespace :users do
|
||||||
|
desc 'clear unconfirmed users'
|
||||||
|
task clear: :environment do
|
||||||
|
User.where('confirmed_at is NULL AND confirmation_sent_at <= ?', 2.days.ago).find_each(&:destroy)
|
||||||
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user