From d1ace32c40c39c88775adaf69a67009e1d9ac7d7 Mon Sep 17 00:00:00 2001 From: evazion Date: Thu, 30 Jun 2022 21:42:30 -0500 Subject: [PATCH] bigquery: exclude large tables from nightly BigQuery dumps. Exclude the posts, post_votes, favorites, media_assets, and ai_tags tables from the BigQuery dumps. These usually take too long to complete and also consume huge amounts of memory in the background workers. --- app/logical/bigquery_export_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/logical/bigquery_export_service.rb b/app/logical/bigquery_export_service.rb index b2ed4b67d..a920f234d 100644 --- a/app/logical/bigquery_export_service.rb +++ b/app/logical/bigquery_export_service.rb @@ -41,7 +41,7 @@ class BigqueryExportService Rails.application.eager_load! models = ApplicationRecord.descendants.sort_by(&:name) - models -= [GoodJob::BaseRecord, GoodJob::Process, GoodJob::Execution, GoodJob::ActiveJobJob, GoodJob::Job, IpAddress, TagRelationship, ArtistVersion, ArtistCommentaryVersion, NoteVersion, PoolVersion, PostVersion, WikiPageVersion] + models -= [GoodJob::BaseRecord, GoodJob::Process, GoodJob::Execution, GoodJob::ActiveJobJob, GoodJob::Job, IpAddress, TagRelationship, ArtistVersion, ArtistCommentaryVersion, NoteVersion, PoolVersion, PostVersion, WikiPageVersion, Post, PostVote, MediaAsset, Favorite, AITag] models end