mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-08 15:05:22 +02:00
Fix Sentry context for security details exception
This commit is contained in:
parent
74c7b0941d
commit
f82f77466a
2 changed files with 1 additions and 22 deletions
|
@ -1,21 +0,0 @@
|
|||
class FetchSecurityInfoJob < ApplicationJob
|
||||
queue_as :low_priority
|
||||
|
||||
def perform(security_id)
|
||||
return unless Security.provider.present?
|
||||
|
||||
security = Security.find(security_id)
|
||||
|
||||
params = {
|
||||
ticker: security.ticker
|
||||
}
|
||||
params[:mic_code] = security.exchange_mic if security.exchange_mic.present?
|
||||
params[:operating_mic] = security.exchange_operating_mic if security.exchange_operating_mic.present?
|
||||
|
||||
security_info_response = Security.provider.fetch_security_info(**params)
|
||||
|
||||
security.update(
|
||||
name: security_info_response.info.dig("name")
|
||||
)
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue