diff --git a/config.rb b/config.rb index 53505cc3a..7b2cf75f3 100644 --- a/config.rb +++ b/config.rb @@ -153,7 +153,6 @@ def self.e2e_test? override :lantern_backup_bucket, "walg-dev-backups" override :e2e_test, "0" override :backup_retention_days, 7, int - optional :lantern_backend_database_url, string override :lantern_log_dataset, "lantern_logs", string # Cloudflare diff --git a/db.rb b/db.rb index 88230811b..cf731c5ba 100644 --- a/db.rb +++ b/db.rb @@ -26,11 +26,3 @@ # DB.extension :date_arithmetic DB.extension :pg_json, :pg_auto_parameterize, :pg_timestamptz, :pg_range, :pg_array Sequel.extension :pg_range_ops - -module LanternBackend - @@db = Sequel.connect(Config.lantern_backend_database_url, max_connections: Config.db_pool, pool_timeout: Config.database_timeout) if Config.lantern_backend_database_url - - def self.db - @@db - end -end diff --git a/model/lantern/lantern_doctor_query.rb b/model/lantern/lantern_doctor_query.rb index ae5fe9b13..49d9ceca2 100644 --- a/model/lantern/lantern_doctor_query.rb +++ b/model/lantern/lantern_doctor_query.rb @@ -127,22 +127,8 @@ def run end def check_daemon_embedding_jobs(db, query_user) - if !LanternBackend.db - fail "No connection to lantern backend database specified" - end - - # TODO:: the backend db connection will be removed after daemon version update is done - jobs = LanternBackend.db - .select(:schema, :table, :src_column, :dst_column) - .from(:embedding_generation_jobs) - .where(database_id: doctor.resource.name) - .where(Sequel.like(:db_connection, "%/#{db}")) - .where(Sequel.lit("init_finished_at IS NOT NULL")) - .where(Sequel.lit("canceled_at IS NULL")) - .all - lantern_server = doctor.resource.representative_server - new_jobs_exists = lantern_server.run_query(<