summaryrefslogtreecommitdiff
path: root/__main__.py
blob: 16b0f632911f77335b7b9a890ae198249324e5c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import os.path
from fastapi import FastAPI
from .datatemplates.agent_id import AgentId
from .modules import daemon
from .config import Config

app = FastAPI()


@app.post("/tasks")
async def get_tasks(agent_id: AgentId):
    return "foo"

# if __name__ == "__main__":
#     with open(os.path.join(os.path.dirname(__file__), Config.TOKEN_FILE_NAME)) as f:
#         token = f.read().strip()
#
#     d = daemon.Daemon(Config.AGENT_SYMBOL, token)
#     d.run()