projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
15795: Accept SystemRootToken from configuration
[arvados.git]
/
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 162bebf5130cfa81973dc3244a06900a4d8ef6f5..8613c749cf247c6c11f309c4d43cddc544e99b4f 100644
(file)
--- a/
services/api/lib/sweep_trashed_objects.rb
+++ b/
services/api/lib/sweep_trashed_objects.rb
@@
-50,15
+50,13
@@
module SweepTrashedObjects
update_all('is_trashed = true')
# Sweep expired tokens
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
def self.sweep_if_stale
end
end
def self.sweep_if_stale
- return if Rails.configuration.
trash_sweep_i
nterval <= 0
- exp = Rails.configuration.
trash_sweep_i
nterval.seconds
+ return if Rails.configuration.
Collections.TrashSweepI
nterval <= 0
+ exp = Rails.configuration.
Collections.TrashSweepI
nterval.seconds
need = false
Rails.cache.fetch('SweepTrashedObjects', expires_in: exp) do
need = true
need = false
Rails.cache.fetch('SweepTrashedObjects', expires_in: exp) do
need = true