From d7f5f523616e77c2d524d63b3bc06f82889e15d1 Mon Sep 17 00:00:00 2001 From: Rajaditya Chauhan Date: Fri, 8 Nov 2024 11:18:38 +0530 Subject: [PATCH] feat(hbi_utils.py): since most of tables are made private, need to change the way of accessing them. --- opl/hbi_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opl/hbi_utils.py b/opl/hbi_utils.py index 40c670c..2e1e559 100644 --- a/opl/hbi_utils.py +++ b/opl/hbi_utils.py @@ -114,7 +114,7 @@ def wait_for_next_second(): def fetch_records_count(inventory): inventory_cursor = inventory.cursor() - inventory_cursor.execute("select count(*) as exact_count from hosts") + inventory_cursor.execute("select count(*) as exact_count from hbi.hosts") for i in inventory_cursor.fetchone(): existing_records = int(i) @@ -306,7 +306,7 @@ def cleanup(args, status_data): inventory_cursor = inventory.cursor() logging.info("Truncating Inventory DB 'hosts' table") - inventory_cursor.execute("TRUNCATE hosts CASCADE") + inventory_cursor.execute("TRUNCATE hbi.hosts CASCADE") inventory.commit() status_data.set_now("parameters.inventory_db.table_hosts.truncated_at")