12 lines
229 B
Ruby
12 lines
229 B
Ruby
|
class ChampFetchExternalDataJob < ApplicationJob
|
||
|
def perform(champ)
|
||
|
if champ.external_id.present?
|
||
|
data = champ.fetch_external_data
|
||
|
|
||
|
if data.present?
|
||
|
champ.update!(data: data)
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
end
|