Spaces:
Sleeping
Sleeping
Commit
·
25797e0
1
Parent(s):
03dc0ec
new code
Browse files
main.py
CHANGED
|
@@ -40,7 +40,7 @@ gcs_bucket = gcs_client.bucket(gcs_bucket_name)
|
|
| 40 |
gcs_file_path = "deepak_6593/db.csv"
|
| 41 |
|
| 42 |
|
| 43 |
-
def read_csv(location="
|
| 44 |
global stop_reading
|
| 45 |
global data_location
|
| 46 |
global counter
|
|
@@ -67,11 +67,11 @@ def stop_reading_thread():
|
|
| 67 |
reading_thread.join()
|
| 68 |
|
| 69 |
@app.get("/update_location/")
|
| 70 |
-
async def update_location(location: str = Query("
|
| 71 |
global reading_thread
|
| 72 |
global stop_reading
|
| 73 |
|
| 74 |
-
if location not in ["
|
| 75 |
return {"error": "Invalid location"}
|
| 76 |
|
| 77 |
if reading_thread is not None and reading_thread.is_alive():
|
|
|
|
| 40 |
gcs_file_path = "deepak_6593/db.csv"
|
| 41 |
|
| 42 |
|
| 43 |
+
def read_csv(location="tambaram"):
|
| 44 |
global stop_reading
|
| 45 |
global data_location
|
| 46 |
global counter
|
|
|
|
| 67 |
reading_thread.join()
|
| 68 |
|
| 69 |
@app.get("/update_location/")
|
| 70 |
+
async def update_location(location: str = Query("tambaram")):
|
| 71 |
global reading_thread
|
| 72 |
global stop_reading
|
| 73 |
|
| 74 |
+
if location not in ["tambaram", "velachery"]:
|
| 75 |
return {"error": "Invalid location"}
|
| 76 |
|
| 77 |
if reading_thread is not None and reading_thread.is_alive():
|