Skip to content

Commit

Permalink
Merge pull request #138 from Congress-Dev/fix-webhook
Browse files Browse the repository at this point in the history
Fix bugs on critical infrastructure
  • Loading branch information
mustyoshi authored Jan 21, 2025
2 parents 80b2071 + 44f7857 commit 0289b19
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions backend/billparser/importers/bills.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down
4 changes: 3 additions & 1 deletion backend/billparser/importers/votes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 = []

Expand Down

0 comments on commit 0289b19

Please sign in to comment.