Mercurial > gemma
diff pkg/imports/queue.go @ 3246:64324aaeb1fb
Made logging of waht is registered to the scheduler and the import queue more deterministic.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Mon, 13 May 2019 09:41:35 +0200 |
parents | 1a0985083c06 |
children | 350a24c92848 |
line wrap: on
line diff
--- a/pkg/imports/queue.go Mon May 13 09:15:20 2019 +0200 +++ b/pkg/imports/queue.go Mon May 13 09:41:35 2019 +0200 @@ -20,6 +20,7 @@ "fmt" "log" "runtime/debug" + "sort" "strings" "sync" "time" @@ -225,6 +226,15 @@ return iqueue.importKindNames() } +// LogImportKindNames logs a list of importer types registered +// to the global import queue. +func LogImportKindNames() { + kinds := ImportKindNames() + sort.Strings(kinds) + log.Printf("info: registered import kinds: %s", + strings.Join(kinds, ", ")) +} + // HasImportKindName checks if the import queue supports a given kind. func HasImportKindName(kind string) bool { return iqueue.hasImportKindName(kind) @@ -241,7 +251,6 @@ // This a good candidate to be called in a init function for // a particular JobCreator. func RegisterJobCreator(kind JobKind, jc JobCreator) { - log.Printf("info: register import job creator for kind '%s'\n", kind) iqueue.registerJobCreator(kind, jc) }