Mercurial > gemma
diff pkg/imports/queue.go @ 1193:58acc343b1b6
Implemented the db stuff of the review process. Needs testing.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Fri, 16 Nov 2018 18:35:09 +0100 |
parents | e3de65179889 |
children | cabf4789e02b |
line wrap: on
line diff
--- a/pkg/imports/queue.go Fri Nov 16 17:51:44 2018 +0100 +++ b/pkg/imports/queue.go Fri Nov 16 18:35:09 2018 +0100 @@ -45,6 +45,7 @@ JobCreator interface { Create(kind JobKind, data string) (Job, error) Depends() []string + StageDone(*sql.Tx, context.Context, int64) error } idJob struct { @@ -141,6 +142,10 @@ q.creators[kind] = jc } +func FindJobCreator(kind JobKind) JobCreator { + return iqueue.jobCreator(kind) +} + func RegisterJobCreator(kind JobKind, jc JobCreator) { log.Printf("info: register import job creator for kind '%s'\n", kind) iqueue.registerJobCreator(kind, jc)