Spaces:
Running
Running
camphong24032002
commited on
Commit
·
51a04f7
1
Parent(s):
8331a56
test: asyncio
Browse files- routes/data.py +3 -1
routes/data.py
CHANGED
@@ -7,6 +7,7 @@ from models.index import IndexPayload
|
|
7 |
from fastapi import status, APIRouter
|
8 |
from typing import Sequence
|
9 |
import json
|
|
|
10 |
|
11 |
router = APIRouter()
|
12 |
|
@@ -53,7 +54,8 @@ async def update_entire_rsi():
|
|
53 |
status_code=status.HTTP_200_OK
|
54 |
)
|
55 |
async def update_entire_macd():
|
56 |
-
Indicator.update_entire_macd()
|
|
|
57 |
|
58 |
|
59 |
@router.post(
|
|
|
7 |
from fastapi import status, APIRouter
|
8 |
from typing import Sequence
|
9 |
import json
|
10 |
+
import asyncio
|
11 |
|
12 |
router = APIRouter()
|
13 |
|
|
|
54 |
status_code=status.HTTP_200_OK
|
55 |
)
|
56 |
async def update_entire_macd():
|
57 |
+
asyncio.create_task(Indicator.update_entire_macd())
|
58 |
+
return None
|
59 |
|
60 |
|
61 |
@router.post(
|