]> git.openstreetmap.org Git - rails.git/blobdiff - lib/tasks/cleanup.rake
Show spinner using delayed css animation in sidebar loader
[rails.git] / lib / tasks / cleanup.rake
index 8c95a17832a23e53222374a4d7bbbfbed8d05985..2cfc7e46dc40190bc750df48cf30aacd6a2b4f32 100644 (file)
@@ -1,9 +1,6 @@
 namespace :db do
   desc "Expire old tokens"
   task :expire_tokens => :environment do
-    OauthNonce.where("timestamp < EXTRACT(EPOCH FROM NOW() - INTERVAL '1 day')").delete_all
-    OauthToken.where("invalidated_at < NOW() - INTERVAL '28 days'").delete_all
-    RequestToken.where("authorized_at IS NULL AND created_at < NOW() - INTERVAL '28 days'").delete_all
     Doorkeeper::AccessGrant.where("revoked_at < NOW() - INTERVAL '28 days' OR (created_at + expires_in * INTERVAL '1 second') < NOW() - INTERVAL '28 days'").delete_all
     Doorkeeper::AccessToken.where("revoked_at < NOW() - INTERVAL '28 days' OR (created_at + expires_in * INTERVAL '1 second') < NOW() - INTERVAL '28 days'").delete_all
   end