Skip to content

Commit

Permalink
Don't prune old buoy reports
Browse files Browse the repository at this point in the history
  • Loading branch information
swrobel committed Jan 4, 2024
1 parent 24620d9 commit 16c6c0e
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions lib/tasks/cleanup.rake
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ namespace :cleanup do
delete from api_requests where created_at < now() - interval '7 day' and service = 'SurflineV2Lotus' and not exists(select from surfline_v2_lotus where api_request_id = api_requests.id);
delete from api_requests where created_at < now() - interval '7 day' and service = 'SurflineLola' and not exists(select from surfline_lolas where api_request_id = api_requests.id);
delete from api_requests where created_at < now() - interval '7 day' and service = 'SurflineNearshore' and not exists(select from surfline_nearshores where api_request_id = api_requests.id);
delete from api_requests where created_at < now() - interval '7 day' and service = 'BuoyReport' and not exists(select from buoy_reports where api_request_id = api_requests.id);
SQL
Rails.logger.info "Finished pruning ApiRequests in #{distance_of_time_in_words_to_now(start_time)}"
end
Expand All @@ -29,7 +28,6 @@ namespace :cleanup do
Msw.unscoped.past.delete_all
SpitcastV1.unscoped.past.delete_all
SpitcastV2.unscoped.past.delete_all
BuoyReport.unscoped.past.delete_all
Rake::Task['cleanup:prune_api_requests'].invoke
end

Expand Down

0 comments on commit 16c6c0e

Please sign in to comment.