changeset 1190:e3de65179889

The imort queue has now six states: * queued: The import job is ready to be processed but waiting. * running: The import job is currently in process. * failed: The import failed * pending: The import succeeded but has to be reviewed. * accepted: The review of the import is done and was positive. * declined: The review of the import is done and was negative.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Fri, 16 Nov 2018 12:15:51 +0100
parents 3d50f558870c
children b23622905a3f
files pkg/imports/queue.go schema/gemma.sql
diffstat 2 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/pkg/imports/queue.go	Fri Nov 16 12:08:46 2018 +0100
+++ b/pkg/imports/queue.go	Fri Nov 16 12:15:51 2018 +0100
@@ -384,7 +384,7 @@
 			if errDo != nil || errCleanup != nil {
 				state = "failed"
 			} else {
-				state = "successful"
+				state = "pending"
 			}
 			if err := updateState(idj.id, state); err != nil {
 				log.Printf("setting state of job %d failed: %v\n", idj.id, err)
--- a/schema/gemma.sql	Fri Nov 16 12:08:46 2018 +0100
+++ b/schema/gemma.sql	Fri Nov 16 12:15:51 2018 +0100
@@ -515,7 +515,10 @@
 --
 -- Import queue and respective logging
 --
-CREATE TYPE waterway.import_state AS ENUM ('queued', 'running', 'successful', 'failed');
+CREATE TYPE waterway.import_state AS ENUM (
+    'queued', 'running', 'failed',
+    'pending', 'accepted', 'declined'
+);
 
 CREATE TABLE waterway.imports (
     id int PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY,