From b82b61ad326c759c01fb0ccfc6015d01ac8f9d2f Mon Sep 17 00:00:00 2001 From: Jesse Tomchak Date: Tue, 14 Nov 2023 15:48:08 -0700 Subject: [PATCH] var error --- app/lib/channel_feed_manager.rb | 3 ++- .../scheduler/channel_mammoth_statuses_scheduler.rb | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/app/lib/channel_feed_manager.rb b/app/lib/channel_feed_manager.rb index 11b165120..3cc7a860d 100644 --- a/app/lib/channel_feed_manager.rb +++ b/app/lib/channel_feed_manager.rb @@ -23,9 +23,10 @@ def batch_to_feed(channel_id, status_ids) # keeping both id and account_id of each status for breadcrumbs # we serialize it to json to store def batch_to_threshold(channel_id, statuses) - Rails.logger.debug { "CHANNEL Statuses:: #{statues.inspect}" } + Rails.logger.debug { "CHANNEL Statuses:: #{statuses.inspect}" } batch_statuses = statuses.map { |s| [s[:id], s.to_json] } + Rails.logger.debug { "CHANNEL Statuses:: #{batch_statuses.inspect}" } perform_push_to_threshold(channel_id, batch_statuses) end diff --git a/app/workers/scheduler/channel_mammoth_statuses_scheduler.rb b/app/workers/scheduler/channel_mammoth_statuses_scheduler.rb index d59fde33a..a77974a85 100644 --- a/app/workers/scheduler/channel_mammoth_statuses_scheduler.rb +++ b/app/workers/scheduler/channel_mammoth_statuses_scheduler.rb @@ -38,6 +38,13 @@ def update_engagement_threshold_channel_feeds! end end + def channel_status_account_ids(channel) + { + id: channel[:id], + statuses: channel[:statuses].pluck(:id, :account_id).map { |id, account_id| { id: id, account_id: account_id } }, + } + end + def channel_feed_manager ChannelFeedManager.instance end