comparison 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
comparison
equal deleted inserted replaced
2613:2ee6c32f1ba6 2614:6691bf76af1c
24 24
25 const ( 25 const (
26 bootRole = "sys_admin" 26 bootRole = "sys_admin"
27 27
28 selectImportConfSQL = ` 28 selectImportConfSQL = `
29 SELECT c.id, username, a.v 29 SELECT c.id, c.kind, a.v
30 FROM import.import_configuration c 30 FROM import.import_configuration c
31 JOIN import.import_configuration_attributes a 31 JOIN import.import_configuration_attributes a
32 ON c.id = a.import_configuration_id 32 ON c.id = a.import_configuration_id
33 WHERE c.id IN ( 33 WHERE a.k = 'cron' AND a.v IS NOT NULL AND a.v <> ''
34 SELECT import_configuration_id 34 `
35 FROM import.import_configuration_attributes
36 WHERE k = 'cron')`
37 35
38 scheduledIDsSQL = ` 36 scheduledIDsSQL = `
39 SELECT id 37 SELECT id
40 FROM import.import_configuration 38 FROM import.import_configuration
41 WHERE 39 WHERE