|
@@ -95,7 +95,7 @@
|
|
|
for locs = (docs->locs (docs (db.sort "locations" (ts->kv "timestampMs" ts) :field "timestampMs" :limit 1500)))
|
|
for locs = (docs->locs (docs (db.sort "locations" (ts->kv "timestampMs" ts) :field "timestampMs" :limit 1500)))
|
|
|
for places = (extract-places locs)
|
|
for places = (extract-places locs)
|
|
|
when places do
|
|
when places do
|
|
|
- (format t "Inserting ~A places for ~A~%" (length places) ts)
|
|
|
|
|
|
|
+ (log:info "Inserting ~A places for ~A~%" (length places) ts)
|
|
|
(save-places places)
|
|
(save-places places)
|
|
|
until (local-time:timestamp> ts now)
|
|
until (local-time:timestamp> ts now)
|
|
|
finally (return ts))))
|
|
finally (return ts))))
|
|
@@ -163,11 +163,11 @@
|
|
|
(let* ((*google-cookie-jar* (load-chrome-cookie-jar ".google.com"))
|
|
(let* ((*google-cookie-jar* (load-chrome-cookie-jar ".google.com"))
|
|
|
(*google-manual-header* (get-history-xsrf-token))
|
|
(*google-manual-header* (get-history-xsrf-token))
|
|
|
(locs (load-history from to nil)))
|
|
(locs (load-history from to nil)))
|
|
|
- (format t "Saving ~A locations for ~A~%" (length locs) from)
|
|
|
|
|
|
|
+ (log:info "Saving ~A locations for ~A~%" (length locs) from)
|
|
|
(save-locations locs)
|
|
(save-locations locs)
|
|
|
(let* ((with-prev-locs (load-locations (local-time:timestamp- from 400 :sec) to))
|
|
(let* ((with-prev-locs (load-locations (local-time:timestamp- from 400 :sec) to))
|
|
|
(places (extract-places with-prev-locs)))
|
|
(places (extract-places with-prev-locs)))
|
|
|
- (format t "Saving ~A place events~%" (length places))
|
|
|
|
|
|
|
+ (log:info "Saving ~A place events~%" (length places))
|
|
|
(save-places places))))
|
|
(save-places places))))
|
|
|
|
|
|
|
|
(defun find-location-at (ms)
|
|
(defun find-location-at (ms)
|
|
@@ -203,4 +203,4 @@
|
|
|
(local-time:timestamp+ from 3 :day)
|
|
(local-time:timestamp+ from 3 :day)
|
|
|
(local-time:now))))
|
|
(local-time:now))))
|
|
|
(import-location-events from to))
|
|
(import-location-events from to))
|
|
|
- (error (e) (princ e))))
|
|
|
|
|
|
|
+ (error (e) (log:error e))))
|