diff --git a/backend/billparser/importers/bills.py b/backend/billparser/importers/bills.py index 06a56e6..efabe4e 100644 --- a/backend/billparser/importers/bills.py +++ b/backend/billparser/importers/bills.py @@ -9,6 +9,8 @@ from datetime import datetime from billparser.run_through import parse_archives, ensure_congress +webhook_url = os.environ.get("DISCORD_WEBHOOK", None) + parser = argparse.ArgumentParser(description="Reprocess") parser.add_argument("--bill", type=str, help="Which bill you want to reprocess") diff --git a/backend/billparser/importers/votes.py b/backend/billparser/importers/votes.py index 8ab1e52..a3efb9f 100644 --- a/backend/billparser/importers/votes.py +++ b/backend/billparser/importers/votes.py @@ -6,11 +6,14 @@ import logging import re import time +import os from billparser.db.handler import Session from billparser.db.models import LegislationVote, LegislatorVote, LegislatorVoteType, Legislation, LegislationChamber, Legislator, Congress from billparser.bioguide.manager import BioGuideImporter +webhook_url = os.environ.get("DISCORD_WEBHOOK", None) + def calculate_congress_from_year() -> int: current_year = datetime.now().year congress = ((current_year - 2001) // 2) + 107 @@ -204,7 +207,6 @@ def download_house_rollcall(session, formatted, congress): def download_senate_rollcall(session, formatted, congress): SENATE_ROLL_TEMPLATE = "https://www.senate.gov/legislative/LIS/roll_call_votes/vote{congress}{session}/vote_{congress}_{session}_{s_index:05}.xml" #Index 5 digits - LEGIS_LOOKUP = get_legislator_lookup() rec = []