X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/16f704326f44fd1e5e5e60b936c9b5895d6a6ff8..1f73a01c0d895811228025fefd430d9c40590175:/services/api/lib/tasks/delete_old_container_logs.rake diff --git a/services/api/lib/tasks/delete_old_container_logs.rake b/services/api/lib/tasks/delete_old_container_logs.rake index b45113e8a5..db1b3667cc 100644 --- a/services/api/lib/tasks/delete_old_container_logs.rake +++ b/services/api/lib/tasks/delete_old_container_logs.rake @@ -8,11 +8,9 @@ # from the logs table. namespace :db do - desc "Remove old container log entries from the logs table" + desc "deprecated / no-op" task delete_old_container_logs: :environment do - delete_sql = "DELETE FROM logs WHERE id in (SELECT logs.id FROM logs JOIN containers ON logs.object_uuid = containers.uuid WHERE event_type IN ('stdout', 'stderr', 'arv-mount', 'crunch-run', 'crunchstat') AND containers.log IS NOT NULL AND clock_timestamp() - containers.finished_at > interval '#{Rails.configuration.clean_container_log_rows_after} seconds')" - - ActiveRecord::Base.connection.execute(delete_sql) + Rails.logger.info "this db:delete_old_container_logs rake task is no longer used" end end