Merge branch '13561-trashed-collection-versions-fix'
authorLucas Di Pentima <ldipentima@veritasgenetics.com>
Mon, 22 Oct 2018 16:29:27 +0000 (13:29 -0300)
committerLucas Di Pentima <ldipentima@veritasgenetics.com>
Mon, 22 Oct 2018 16:30:38 +0000 (13:30 -0300)
Refs #13561

Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima@veritasgenetics.com>

services/api/lib/sweep_trashed_objects.rb

index 162bebf5130cfa81973dc3244a06900a4d8ef6f5..bedbd68a44c8a9e988c202a21457281f680e840a 100644 (file)
@@ -50,9 +50,7 @@ module SweepTrashedObjects
         update_all('is_trashed = true')
 
       # Sweep expired tokens
-      ApiClientAuthorization.
-        where("expires_at <= statement_timestamp()").
-        destroy_all
+      ActiveRecord::Base.connection.execute("DELETE from api_client_authorizations where expires_at <= statement_timestamp()")
     end
   end