mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-11 09:41:40 -05:00
Merge branch 'dev' into fix/imports/gpx-empty-tracks
This commit is contained in:
commit
988e5a1a63
3 changed files with 4 additions and 5 deletions
|
|
@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
|
||||||
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
||||||
and this project adheres to [Semantic Versioning](http://semver.org/).
|
and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||||
|
|
||||||
# 0.23.4 - 2025-01-21
|
# 0.23.4 - 2025-01-22
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,6 @@ class Api::V1::Countries::VisitedCitiesController < ApiController
|
||||||
private
|
private
|
||||||
|
|
||||||
def required_params
|
def required_params
|
||||||
%i[start_at end_at api_key]
|
%i[start_at end_at]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -30,12 +30,11 @@ class Tasks::Imports::GoogleRecords
|
||||||
|
|
||||||
def process_file_in_batches(import_id)
|
def process_file_in_batches(import_id)
|
||||||
batch = []
|
batch = []
|
||||||
|
index = 0
|
||||||
|
|
||||||
Oj.load_file(@file_path, mode: :compat) do |record|
|
Oj.load_file(@file_path, mode: :compat) do |record|
|
||||||
next unless record.is_a?(Hash) && record['locations']
|
next unless record.is_a?(Hash) && record['locations']
|
||||||
|
|
||||||
index = 0
|
|
||||||
|
|
||||||
record['locations'].each do |location|
|
record['locations'].each do |location|
|
||||||
batch << location
|
batch << location
|
||||||
|
|
||||||
|
|
@ -47,7 +46,7 @@ class Tasks::Imports::GoogleRecords
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
Import::GoogleTakeoutJob.perform_later(import_id, Oj.dump(batch)) if batch.any?
|
Import::GoogleTakeoutJob.perform_later(import_id, Oj.dump(batch), index) if batch.any?
|
||||||
end
|
end
|
||||||
|
|
||||||
def log_start
|
def log_start
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue