[ARVADOS] created: 1.2.0-243-g3b78e0cd0
Git user
git at public.curoverse.com
Fri Oct 19 10:07:11 EDT 2018
at 3b78e0cd0a4e94fb7f77df2b1751f32953b6c4fa (commit)
commit 3b78e0cd0a4e94fb7f77df2b1751f32953b6c4fa
Author: Peter Amstutz <pamstutz at veritasgenetics.com>
Date: Fri Oct 19 10:06:50 2018 -0400
14260: Use straight SQL DELETE instead of destroy_all
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz at veritasgenetics.com>
diff --git a/services/api/lib/sweep_trashed_objects.rb b/services/api/lib/sweep_trashed_objects.rb
index 162bebf51..bedbd68a4 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
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list