add geo info and do refractor on workers

This commit is contained in:
2021-04-29 20:44:21 +02:00
parent f7799bb514
commit c5190b48f8
32 changed files with 241 additions and 205 deletions

View File

@@ -9,10 +9,9 @@ class WowPetsWorker < WowSidekiqWorker
return unless result.status_code == 200
result.pets.each do |pet|
wow_pet = WowPet.where(pet_id: pet.id).first_or_initialize
wow_pet = WowPet.find_or_initialize_by(pet_id: pet.id)
# Global data
wow_pet.pet_id = pet.id
wow_pet.href = pet.key.href
# Localisation data