comparison pkg/imports/bn.go @ 1975:d966f03ea819

Imports: Added the new state 'unchanged' which can be issued by the imports to indicate that the database is not modified by the particular imports.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Wed, 23 Jan 2019 11:20:14 +0100
parents 32c56e6c089a
children 59055c8301df
comparison
equal deleted inserted replaced
1966:da6dc9b73f34 1975:d966f03ea819
250 return nil, err 250 return nil, err
251 } 251 }
252 feedback.Info("Inserted '%s' into database", bn.OBJNAM) 252 feedback.Info("Inserted '%s' into database", bn.OBJNAM)
253 } 253 }
254 if len(nids) == 0 { 254 if len(nids) == 0 {
255 feedback.Error("No new bottlenecks found") 255 return nil, UnchangedError("No new bottlenecks found")
256 return nil, errors.New("No new bottlenecks found")
257 } 256 }
258 257
259 feedback.Info("Storing %d bottlenecks took %s", len(nids), time.Since(start)) 258 feedback.Info("Storing %d bottlenecks took %s", len(nids), time.Since(start))
260 if err := tx.Commit(); err != nil { 259 if err := tx.Commit(); err != nil {
261 return nil, err 260 return nil, err