Mercurial > gemma
diff pkg/imports/sr.go @ 979:7934b5c1a910
Finally enqueue sounding result import job to import jobs.
Sends back the id of the job.
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Fri, 19 Oct 2018 12:14:53 +0200 |
parents | 544a5cfe07cd |
children | f4f5bd73bd27 |
line wrap: on
line diff
--- a/pkg/imports/sr.go Thu Oct 18 18:37:19 2018 +0200 +++ b/pkg/imports/sr.go Fri Oct 19 12:14:53 2018 +0200 @@ -25,8 +25,8 @@ ) type SoundingResult struct { - who string - dir string + Who string + Dir string } const SoundingResultDateFormat = "2006-01-02" @@ -128,12 +128,12 @@ return err } -func (sr *SoundingResult) Who() string { - return sr.who +func (sr *SoundingResult) User() string { + return sr.Who } func (sr *SoundingResult) CleanUp() error { - return os.RemoveAll(sr.dir) + return os.RemoveAll(sr.Dir) } func find(needle string, haystack []*zip.File) *zip.File { @@ -276,7 +276,7 @@ func (sr *SoundingResult) Do(conn *sql.Conn) error { - z, err := zip.OpenReader(filepath.Join(sr.dir, "sr.zip")) + z, err := zip.OpenReader(filepath.Join(sr.Dir, "sr.zip")) if err != nil { return err }