X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/dd3172b922a00ffc1530188a7988356f376a067f..cbf93e8d897448dbd52369afe89fef2392140ff1:/services/api/lib/sweep_trashed_objects.rb diff --git a/services/api/lib/sweep_trashed_objects.rb b/services/api/lib/sweep_trashed_objects.rb index 162bebf513..bedbd68a44 100644 --- a/services/api/lib/sweep_trashed_objects.rb +++ b/services/api/lib/sweep_trashed_objects.rb @@ -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