ensure ExternalFeedAggregator doesn't choke through pgbouncer
refs CNVS-15875 Change-Id: I2ac0b7ddf350b08486ad0ea4cf03e3715cc1f39a Reviewed-on: https://gerrit.instructure.com/43182 Tested-by: Jenkins <jenkins@instructure.com> Reviewed-by: Rob Orton <rob@instructure.com> Product-Review: Cody Cutrer <cody@instructure.com> QA-Review: Cody Cutrer <cody@instructure.com>
This commit is contained in:
parent
6b137bb405
commit
e79632e8a6
|
@ -31,10 +31,12 @@ class ExternalFeedAggregator
|
|||
|
||||
def process
|
||||
Shackles.activate(:slave) do
|
||||
ExternalFeed.to_be_polled.find_each do |feed|
|
||||
next if !feed.context || feed.context.root_account.deleted?
|
||||
Shackles.activate(:master) do
|
||||
process_feed(feed)
|
||||
ExternalFeed.transaction do
|
||||
ExternalFeed.to_be_polled.find_each do |feed|
|
||||
next if !feed.context || feed.context.root_account.deleted?
|
||||
Shackles.activate(:master) do
|
||||
process_feed(feed)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue