diff pkg/imports/queue.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 3841509f6e9e
line wrap: on
line diff
--- a/pkg/imports/queue.go	Thu Oct 18 18:37:19 2018 +0200
+++ b/pkg/imports/queue.go	Fri Oct 19 12:14:53 2018 +0200
@@ -12,7 +12,7 @@
 )
 
 type Job interface {
-	Who() string
+	User() string
 	Do(conn *sql.Conn) error
 	CleanUp() error
 }
@@ -47,7 +47,7 @@
 		job = queue.Remove(queue.Front()).(Job)
 		queueCond.L.Unlock()
 
-		if err := auth.RunAs(job.Who(), context.Background(), job.Do); err != nil {
+		if err := auth.RunAs(job.User(), context.Background(), job.Do); err != nil {
 			log.Printf("import error: %v\n", err)
 		}
 		if err := job.CleanUp(); err != nil {