This repository has been archived on 2020-08-14. You can view files and clone it, but cannot push or open issues or pull requests.
statuspage/app/tasks.py

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))