mirror of
https://github.com/we-promise/sure.git
synced 2026-04-19 12:04:08 +00:00
Add env to toggle provider price syncs
This commit is contained in:
@@ -29,6 +29,8 @@ module Security::Provided
|
||||
end
|
||||
|
||||
def sync_provider_prices(start_date:, end_date: Date.current)
|
||||
return 0 unless ENV["PROVIDER_PRICE_SYNC_ENABLED"] == "true"
|
||||
|
||||
unless has_prices?
|
||||
Rails.logger.warn("Security id=#{id} ticker=#{ticker} is not known by provider, skipping price sync")
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user