fix(disclosures): add message after succesfully finishing

This commit is contained in:
2025-01-06 21:08:21 +01:00
parent fcfbd59c8e
commit 0615b3bfd3

View File

@@ -10,7 +10,9 @@ load_dotenv()
class Disclosures: class Disclosures:
def __init__(self, telegram_api_key, telegram_channel, db_name, schema_path, seed_path): def __init__(
self, telegram_api_key, telegram_channel, db_name, schema_path, seed_path
):
self.telegram = Telegram(telegram_api_key, telegram_channel) self.telegram = Telegram(telegram_api_key, telegram_channel)
self.db = DB(db_name, schema_path, seed_path) self.db = DB(db_name, schema_path, seed_path)
@@ -100,6 +102,11 @@ class Disclosures:
self.insertDisclosures(sent) self.insertDisclosures(sent)
# print a message with the number of disclosures sent and the number of disclosures inserted and total disclosures
print(
f"Sent {len(sent)} disclosures. Inserted {len(sent)} disclosures. Total disclosures: {len(values)}"
)
d = Disclosures( d = Disclosures(
os.getenv("TELEGRAM_API_KEY"), os.getenv("TELEGRAM_API_KEY"),