Skip to content

Commit

Permalink
var error
Browse files Browse the repository at this point in the history
  • Loading branch information
jtomchak committed Nov 14, 2023
1 parent ad5c37d commit b82b61a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/lib/channel_feed_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
7 changes: 7 additions & 0 deletions app/workers/scheduler/channel_mammoth_statuses_scheduler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b82b61a

Please sign in to comment.