15 lines
338 B
Python
15 lines
338 B
Python
|
import time, asyncio, uvicorn
|
||
|
from celery import Celery
|
||
|
from celery.schedules import crontab
|
||
|
from app.celery import app
|
||
|
from app import ultrametrics
|
||
|
from app.main import app as statuspage
|
||
|
|
||
|
@app.task
|
||
|
def metrics():
|
||
|
task = asyncio.create_task(ultrametrics.main())
|
||
|
|
||
|
@app.task
|
||
|
def api():
|
||
|
task = asyncio.create_task(uvicorn.run(statuspage))
|