comparison pkg/imports/fd.go @ 5275:73563c4bba5b wfs-optional-sortby

Slight improvement of log messages for fd import.
author wilde@azure1.rgb.intevation.de
date Tue, 09 Jun 2020 10:43:43 +0200
parents 41a67619c170
children 3bab0e19f08b
comparison
equal deleted inserted replaced
5274:31c50d676bb0 5275:73563c4bba5b
2 // without warranty, see README.md and license for details. 2 // without warranty, see README.md and license for details.
3 // 3 //
4 // SPDX-License-Identifier: AGPL-3.0-or-later 4 // SPDX-License-Identifier: AGPL-3.0-or-later
5 // License-Filename: LICENSES/AGPL-3.0.txt 5 // License-Filename: LICENSES/AGPL-3.0.txt
6 // 6 //
7 // Copyright (C) 2018 by via donau 7 // Copyright (C) 2018, 2019, 2020 by via donau
8 // – Österreichische Wasserstraßen-Gesellschaft mbH 8 // – Österreichische Wasserstraßen-Gesellschaft mbH
9 // Software engineering by Intevation GmbH 9 // Software engineering by Intevation GmbH
10 // 10 //
11 // Author(s): 11 // Author(s):
12 // * Raimund Renkert <raimund.renkert@intevation.de> 12 // * Raimund Renkert <raimund.renkert@intevation.de>
461 "Features outside responsibility area or unchanged: %d", outside) 461 "Features outside responsibility area or unchanged: %d", outside)
462 } 462 }
463 463
464 if features == 0 { 464 if features == 0 {
465 feedback.Info("No new features found") 465 feedback.Info("No new features found")
466 } else {
467 feedback.Info("Stored %d features", features)
466 } 468 }
467 469
468 // Invalidate features that have been removed from data source 470 // Invalidate features that have been removed from data source
469 res, err := tx.QueryContext(ctx, selectOldSQL, fd.LOS) 471 res, err := tx.QueryContext(ctx, selectOldSQL, fd.LOS)
470 if err != nil { 472 if err != nil {
500 ctx, 502 ctx,
501 importID, 503 importID,
502 oldID, 504 oldID,
503 ).Scan(&fdid, &lat, &lon) 505 ).Scan(&fdid, &lat, &lon)
504 }); err != nil { 506 }); err != nil {
505 feedback.Error(pgxutils.ReadableError{Err: err}.Error()) 507 feedback.Error(pgxutils.ReadableError{Err: err}.Error() +
508 "- while tracking invalidation of: %d", oldID)
506 continue 509 continue
507 } 510 }
508 fds = append(fds, fdSummary{ID: fdid, Lat: lat, Lon: lon}) 511 fds = append(fds, fdSummary{ID: fdid, Lat: lat, Lon: lon})
509 512
510 if err := track( 513 if err := track(