# HG changeset patch # User Sascha L. Teichmann # Date 1548627570 -3600 # Node ID c06a2e5397fcea26125cdac60a6fdd2f0a4ae80d # Parent 0b203a3b3e8ea5be7338d21e8a4fef7ee9653867 Scheduler: Adjusted booting of scheduled imports to new database schema. diff -r 0b203a3b3e8e -r c06a2e5397fc pkg/scheduler/boot.go --- a/pkg/scheduler/boot.go Sun Jan 27 23:09:42 2019 +0100 +++ b/pkg/scheduler/boot.go Sun Jan 27 23:19:30 2019 +0100 @@ -26,13 +26,18 @@ bootRole = "sys_admin" selectImportConfSQL = ` -SELECT id, username, cron -FROM import.import_configuration -WHERE cron IS NOT NULL` +SELECT c.id, username, a.v +FROM import.import_configuration c +JOIN import.import_configuration_attributes a +ON c.id = a.import.import_configuration_id +WHERE + c.id IN (SELECT import_configuration_id WHERE k = 'cron')` scheduledIDsSQL = ` SELECT id from import.import_configuration -WHERE username = $1 AND cron IS NOT NULL` +WHERE + username = $1 + AND id IN (SELECT import_configuration_id WHERE k = 'cron')` ) func init() { go boot() }