Mercurial > gemma
comparison pkg/scheduler/boot.go @ 2054:b03e487117df unify_imports
Scheduler: Fixed booting SQL statements.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Mon, 28 Jan 2019 09:55:28 +0100 |
parents | c06a2e5397fc |
children | 6594903a14e8 |
comparison
equal
deleted
inserted
replaced
2053:c06a2e5397fc | 2054:b03e487117df |
---|---|
28 selectImportConfSQL = ` | 28 selectImportConfSQL = ` |
29 SELECT c.id, username, a.v | 29 SELECT c.id, username, 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.import_configuration_id | 32 ON c.id = a.import.import_configuration_id |
33 WHERE | 33 WHERE c.id IN ( |
34 c.id IN (SELECT import_configuration_id WHERE k = 'cron')` | 34 SELECT import_configuration_id |
35 FROM import.import_configuration_attributes | |
36 WHERE k = 'cron')` | |
35 | 37 |
36 scheduledIDsSQL = ` | 38 scheduledIDsSQL = ` |
37 SELECT id from import.import_configuration | 39 SELECT id |
40 FROM import.import_configuration | |
38 WHERE | 41 WHERE |
39 username = $1 | 42 username = $1 |
40 AND id IN (SELECT import_configuration_id WHERE k = 'cron')` | 43 AND id IN ( |
44 SELECT import_configuration_id | |
45 FROM import.import_configuration_attributes | |
46 WHERE k = 'cron')` | |
41 ) | 47 ) |
42 | 48 |
43 func init() { go boot() } | 49 func init() { go boot() } |
44 | 50 |
45 // boot starts the scheduler with the configurations from | 51 // boot starts the scheduler with the configurations from |