1
0
mirror of https://github.com/elisspace/FxLifeSheet.git synced 2026-08-29 15:44:00 +00:00

location_info.rb: update start date

This commit is contained in:
Felix Krause
2022-02-16 18:43:06 +01:00
parent 0f9e68be65
commit 5658facf6b

View File

@@ -4,14 +4,13 @@ require 'net/http'
module Importers
class BackfillLocationInfo < Importer
def import
current_date = Date.new(2020, 11, 27)
current_date = Date.new(2019, 1, 1)
all_locations = []
while current_date < Date.today - 2 # same as `backfill_weather.rb`
puts "Location info for #{current_date}..."
telegram_lat = raw_data.where(key: "locationLat").where(matcheddate: current_date).first
telegram_lng = raw_data.where(key: "locationLng").where(matcheddate: current_date).first
if telegram_lat && telegram_lng
all_locations << [telegram_lat[:value], telegram_lng[:value]]