Skip to content

Commit

Permalink
feat: service developments
Browse files Browse the repository at this point in the history
  • Loading branch information
fmelihh committed Jul 19, 2024
1 parent 0a9b72a commit 7a7b85f
Show file tree
Hide file tree
Showing 3 changed files with 103 additions and 101 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from sqlalchemy.ext.declarative import declarative_base


engine = create_engine("clickhouse+native://default:@localhost:8123/default", future=True)
engine = create_engine(os.getenv("CLICKHOUSE_URL"), future=True)

SessionLocal = sessionmaker(
autocommit=False,
Expand Down
4 changes: 3 additions & 1 deletion src/recommendation_engine/app/tasks/data_extraction.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ def run(self, *args, **kwargs):
restaurant_task = RestaurantTask()
tasks.append(
celery.chain(
restaurant_task.s(provider=provider, lat=city["lat"], lon=city["lon"]),
restaurant_task.s(
provider=provider, lat=city["lat"], lon=city["lon"]
),
MenuTask().s(),
CommentTask().s(),
)
Expand Down
198 changes: 99 additions & 99 deletions static/cities.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,103 @@
[
{
"name": "elazığ",
"plate": "23",
"latitude": "38.6748",
"longitude": "39.2225",
"counties": [
"merkez",
"kovancılar",
"karakoçan",
"palu",
"arıcak",
"baskil",
"maden",
"sivrice",
"alacakaya",
"keban",
"ağın"
]
},
{
"name": "ankara",
"plate": "06",
"latitude": "39.9334",
"longitude": "32.8597",
"counties": [
"çankaya",
"keçiören",
"yenimahalle",
"mamak",
"etimesgut",
"sincan",
"altındağ",
"pursaklar",
"gölbaşı",
"polatlı",
"çubuk",
"kahramankazan",
"beypazarı",
"elmadağ",
"şereflikoçhisar",
"akyurt",
"nallıhan",
"haymana",
"kızılcahamam",
"bala",
"kalecik",
"ayaş",
"güdül",
"çamlıdere",
"evren"
]
},
{
"name": "istanbul",
"plate": "34",
"latitude": "41.0082",
"longitude": "28.9784",
"counties": [
"esenyurt",
"küçükçekmece",
"bağcılar",
"ümraniye",
"pendik",
"bahçelievler",
"üsküdar",
"sultangazi",
"gaziosmanpaşa",
"maltepe",
"kartal",
"esenler",
"kadıköy",
"kağıthane",
"avcılar",
"ataşehir",
"fatih",
"eyüp",
"sancaktepe",
"başakşehir",
"sarıyer",
"sultanbeyli",
"güngören",
"beylikdüzü",
"zeytinburnu",
"bayrampaşa",
"şişli",
"beykoz",
"arnavutköy",
"tuzla",
"çekmeköy",
"beyoğlu",
"büyükçekmece",
"bakırköy",
"beşiktaş",
"silivri",
"çatalca",
"şile",
"adalar"
]
},
{
"name": "adana",
"plate": "01",
Expand Down Expand Up @@ -96,39 +195,6 @@
"hamamözü"
]
},
{
"name": "ankara",
"plate": "06",
"latitude": "39.9334",
"longitude": "32.8597",
"counties": [
"çankaya",
"keçiören",
"yenimahalle",
"mamak",
"etimesgut",
"sincan",
"altındağ",
"pursaklar",
"gölbaşı",
"polatlı",
"çubuk",
"kahramankazan",
"beypazarı",
"elmadağ",
"şereflikoçhisar",
"akyurt",
"nallıhan",
"haymana",
"kızılcahamam",
"bala",
"kalecik",
"ayaş",
"güdül",
"çamlıdere",
"evren"
]
},
{
"name": "antalya",
"plate": "07",
Expand Down Expand Up @@ -463,25 +529,6 @@
"lalapaşa"
]
},
{
"name": "elazığ",
"plate": "23",
"latitude": "38.6748",
"longitude": "39.2225",
"counties": [
"merkez",
"kovancılar",
"karakoçan",
"palu",
"arıcak",
"baskil",
"maden",
"sivrice",
"alacakaya",
"keban",
"ağın"
]
},
{
"name": "erzincan",
"plate": "24",
Expand Down Expand Up @@ -681,53 +728,6 @@
"çamlıyayla"
]
},
{
"name": "istanbul",
"plate": "34",
"latitude": "41.0082",
"longitude": "28.9784",
"counties": [
"esenyurt",
"küçükçekmece",
"bağcılar",
"ümraniye",
"pendik",
"bahçelievler",
"üsküdar",
"sultangazi",
"gaziosmanpaşa",
"maltepe",
"kartal",
"esenler",
"kadıköy",
"kağıthane",
"avcılar",
"ataşehir",
"fatih",
"eyüp",
"sancaktepe",
"başakşehir",
"sarıyer",
"sultanbeyli",
"güngören",
"beylikdüzü",
"zeytinburnu",
"bayrampaşa",
"şişli",
"beykoz",
"arnavutköy",
"tuzla",
"çekmeköy",
"beyoğlu",
"büyükçekmece",
"bakırköy",
"beşiktaş",
"silivri",
"çatalca",
"şile",
"adalar"
]
},
{
"name": "izmir",
"plate": "35",
Expand Down

0 comments on commit 7a7b85f

Please sign in to comment.