Mercurial > gemma
comparison pkg/imports/bn.go @ 1906:32c56e6c089a
Stretch import: Added forgotten source file.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Fri, 18 Jan 2019 17:13:12 +0100 |
parents | c4af342be999 |
children | d966f03ea819 |
comparison
equal
deleted
inserted
replaced
1904:931b15be6d7f | 1906:32c56e6c089a |
---|---|
255 feedback.Error("No new bottlenecks found") | 255 feedback.Error("No new bottlenecks found") |
256 return nil, errors.New("No new bottlenecks found") | 256 return nil, errors.New("No new bottlenecks found") |
257 } | 257 } |
258 | 258 |
259 feedback.Info("Storing %d bottlenecks took %s", len(nids), time.Since(start)) | 259 feedback.Info("Storing %d bottlenecks took %s", len(nids), time.Since(start)) |
260 if err = tx.Commit(); err == nil { | 260 if err := tx.Commit(); err != nil { |
261 feedback.Info("Import of bottlenecks was successful") | 261 return nil, err |
262 } | 262 } |
263 | 263 feedback.Info("Import of bottlenecks was successful") |
264 summary := struct { | 264 summary := struct { |
265 Bottlenecks []string `json:"bottlenecks"` | 265 Bottlenecks []string `json:"bottlenecks"` |
266 }{ | 266 }{ |
267 Bottlenecks: nids, | 267 Bottlenecks: nids, |
268 } | 268 } |
269 return &summary, err | 269 return &summary, nil |
270 } | 270 } |