comparison pkg/imports/queue.go @ 1189:3d50f558870c

REST GET call to /imports now has the ability to be filtered by kinds or states. Something like &states=queued,running,failed,pending,accepted&kinds=sr Note: The states are not the current states of the import queue, yet. The import queue will be adjusted soon.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Fri, 16 Nov 2018 12:08:46 +0100
parents 930fdd8b474f
children e3de65179889
comparison
equal deleted inserted replaced
1188:f7131eeb2a53 1189:3d50f558870c
67 var iqueue = importQueue{ 67 var iqueue = importQueue{
68 signalChan: make(chan struct{}), 68 signalChan: make(chan struct{}),
69 creators: map[JobKind]JobCreator{}, 69 creators: map[JobKind]JobCreator{},
70 usedDeps: map[string]struct{}{}, 70 usedDeps: map[string]struct{}{},
71 } 71 }
72
73 var (
74 ImportStateNames = []string{
75 "queued",
76 "running",
77 "failed",
78 "pending",
79 "accepted",
80 "declined",
81 }
82 )
72 83
73 const ( 84 const (
74 queueUser = "sys_admin" 85 queueUser = "sys_admin"
75 86
76 reEnqueueRunningSQL = ` 87 reEnqueueRunningSQL = `