Mercurial > gemma
diff pkg/scheduler/boot.go @ 2614:6691bf76af1c
Booting scheduler: Fixed scheduling import jobs at boot time.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Wed, 13 Mar 2019 12:45:06 +0100 |
parents | 6594903a14e8 |
children | 5f47eeea988d |
line wrap: on
line diff
--- a/pkg/scheduler/boot.go Wed Mar 13 12:31:52 2019 +0100 +++ b/pkg/scheduler/boot.go Wed Mar 13 12:45:06 2019 +0100 @@ -26,14 +26,12 @@ bootRole = "sys_admin" selectImportConfSQL = ` -SELECT c.id, username, a.v +SELECT c.id, c.kind, a.v FROM import.import_configuration c JOIN import.import_configuration_attributes a ON c.id = a.import_configuration_id -WHERE c.id IN ( - SELECT import_configuration_id - FROM import.import_configuration_attributes - WHERE k = 'cron')` +WHERE a.k = 'cron' AND a.v IS NOT NULL AND a.v <> '' +` scheduledIDsSQL = ` SELECT id