11"""app.data"""
2- from ..services .location .csbs import CSBSLocationService
3- from ..services .location .jhu import JhuLocationService
4- from ..services .location .nyt import NYTLocationService
2+ from ..services .location .csbs import CSBSLocationServicee
3+ from ..services .location .jhu import JhuLocationServicee
4+ from ..services .location .nyt import NYTLocationServicee
5+ from app .services .location .__init__ import LocationServicer
56
67class DataSourceSingletonMeta (type ):
78 """
8- access point to the DataSourceSingleton
9+ access point to the DataSource
910 """
11+
1012 _instances = {}
1113
1214 def __call__ (cls , * args , ** kwargs ):
@@ -22,9 +24,9 @@ def __call__(cls, *args, **kwargs):
2224
2325class DataSourceSingleton (metaclass = DataSourceSingletonMeta ):
2426 DATA_SOURCES = {
25- "jhu" : JhuLocationService ( ),
26- "csbs" : CSBSLocationService ( ),
27- "nyt" : NYTLocationService ( ),
27+ "jhu" : LocationServicer ( JhuLocationServicee () ),
28+ "csbs" : LocationServicer ( CSBSLocationServicee () ),
29+ "nyt" : LocationServicer ( NYTLocationServicee () ),
2830 }
2931 def get_data_source (self , dataSource ):
3032 return self .DATA_SOURCES .get (dataSource .lower ())
0 commit comments