There was an error while loading. Please reload this page.
1 parent c09ca91 commit 9ca1a3bCopy full SHA for 9ca1a3b
1 file changed
app/modules/scouting/models/scouting_target.rb
@@ -56,6 +56,8 @@ class ScoutingTarget < ApplicationRecord
56
57
# Callbacks
58
before_save :normalize_summoner_name
59
+ after_create_commit :enqueue_oe_enrichment
60
+ after_update_commit :enqueue_oe_enrichment, if: :saved_change_to_professional_name?
61
62
# ── Meilisearch ────────────────────────────────────────────────────
63
def self.meili_searchable_attributes
@@ -203,4 +205,10 @@ def pool_diversity_score
203
205
def normalize_summoner_name
204
206
self.summoner_name = summoner_name.strip if summoner_name.present?
207
end
208
+
209
+ def enqueue_oe_enrichment
210
+ return unless professional_name.present?
211
212
+ MetaIntelligence::EnrichScoutingTargetWithOeJob.perform_later(id)
213
+ end
214
0 commit comments