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 WowMountsWorker < WowSidekiqWorker
return unless result.status_code == 200
result.mounts.each do |mount|
wow_mount = WowMount.where(mount_id: mount.id).first_or_initialize
wow_mount = WowMount.find_or_initialize_by(mount_id: mount.id)
# Global data
wow_mount.mount_id = mount.id
wow_mount.href = mount.key.href
# Localisation data