X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/0f644e242ef37c911ad3dc25aca8135c339de349..f44a15adce692614ecb816dbe2d0205704d9a4ab:/services/api/lib/sweep_trashed_collections.rb diff --git a/services/api/lib/sweep_trashed_collections.rb b/services/api/lib/sweep_trashed_collections.rb index 84497a179d..a899191db0 100644 --- a/services/api/lib/sweep_trashed_collections.rb +++ b/services/api/lib/sweep_trashed_collections.rb @@ -9,10 +9,10 @@ module SweepTrashedCollections def self.sweep_now act_as_system_user do - Collection.unscoped. + Collection. where('delete_at is not null and delete_at < statement_timestamp()'). destroy_all - Collection.unscoped. + Collection. where('is_trashed = false and trash_at < statement_timestamp()'). update_all('is_trashed = true') end