Skip to content

Commit

Permalink
Pass params to requests.get properly
Browse files Browse the repository at this point in the history
  • Loading branch information
harryjmoss committed Jan 26, 2024
1 parent bb1f1b8 commit dc45475
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web/src/web/celery_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

@celery_app.task
def get_response(
url: str, cache_key: str, params: Optional[int] = None, expires: int = 3600
url: str, cache_key: str, params: Optional[dict] = None, expires: int = 3600
) -> tuple[object, int]:
"""
Get a response from a URL
Expand All @@ -31,7 +31,7 @@ def get_response(
response = requests.get(url)
else:
logger.info(f"Fetching {url} - params {str(params)[:16]} ...")
response = requests.get(url, params=str(params))
response = requests.get(url, params=params)

if response.status_code != 200:
logger.error(f"Error fetching {url}: {response.status_code}")
Expand Down

0 comments on commit dc45475

Please sign in to comment.