diff --git a/app/lib/channel_feed_manager.rb b/app/lib/channel_feed_manager.rb index 867fbdbe7..11b165120 100644 --- a/app/lib/channel_feed_manager.rb +++ b/app/lib/channel_feed_manager.rb @@ -23,7 +23,7 @@ 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) - # statuses = status_ids.zip(status_ids) + Rails.logger.debug { "CHANNEL Statuses:: #{statues.inspect}" } batch_statuses = statuses.map { |s| [s[:id], s.to_json] } perform_push_to_threshold(channel_id, batch_statuses) diff --git a/app/workers/scheduler/channel_mammoth_statuses_scheduler.rb b/app/workers/scheduler/channel_mammoth_statuses_scheduler.rb index aac5b5ecd..d59fde33a 100644 --- a/app/workers/scheduler/channel_mammoth_statuses_scheduler.rb +++ b/app/workers/scheduler/channel_mammoth_statuses_scheduler.rb @@ -34,7 +34,7 @@ def update_engagement_threshold_channel_feeds! filtered_channels = Mammoth::Channels.new.filter_statuses_with_threshold filtered_channels.each do |channel| Rails.logger.debug { "FILTER CHANNEL:: #{channel} \n" } - channel_feed_manager.batch_to_threshold(channel[:id], channel[:statuses].pluck(:id, :account_id)) + channel_feed_manager.batch_to_threshold(channel[:id], channel[:statuses].pluck(:id, :account_id).map { |id, account_id| { id: id, account_id: account_id } }) end end