Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update jhu.py
Imported newly created class and getting the baseUrl for Jhu from BaseUrl Class
  • Loading branch information
Billa32 authored Jul 26, 2021
commit 5780c38b95a68b040f3173dbad6e014a88bfa364
4 changes: 3 additions & 1 deletion app/services/location/jhu.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from ...utils import date as date_util
from ...utils import httputils
from . import LocationService
from ...utils.baseurls import BaseUrl

LOGGER = logging.getLogger("services.location.jhu")
PID = os.getpid()
Expand All @@ -41,7 +42,7 @@ async def get(self, loc_id): # pylint: disable=arguments-differ


# Base URL for fetching category.
BASE_URL = "https://raw.githubusercontent.com/CSSEGISandData/2019-nCoV/master/csse_covid_19_data/csse_covid_19_time_series/"
BASE_URL = BaseUrl.JHU


@cached(cache=TTLCache(maxsize=4, ttl=1800))
Expand Down Expand Up @@ -226,3 +227,4 @@ def parse_history(key: tuple, locations: list, index: int):
LOGGER.debug(f"iteration data merge error: {index} {key}")

return location_history