deploy-trig
This commit is contained in:
parent
e312a3747c
commit
736569930b
|
@ -5,9 +5,10 @@ import aiohttp
|
||||||
from settings import API_BASE
|
from settings import API_BASE
|
||||||
|
|
||||||
headers = {"Content-Type": "application/json"}
|
headers = {"Content-Type": "application/json"}
|
||||||
api_base = API_BASE or "https://core.discours.io"
|
|
||||||
|
|
||||||
|
|
||||||
|
# TODO: rewrite to orm usage?
|
||||||
|
|
||||||
async def _request_endpoint(query_name, body) -> Any:
|
async def _request_endpoint(query_name, body) -> Any:
|
||||||
async with aiohttp.ClientSession() as session:
|
async with aiohttp.ClientSession() as session:
|
||||||
async with session.post(API_BASE, headers=headers, json=body) as response:
|
async with session.post(API_BASE, headers=headers, json=body) as response:
|
||||||
|
|
|
@ -2,8 +2,7 @@ from os import environ
|
||||||
|
|
||||||
PORT = 80
|
PORT = 80
|
||||||
DB_URL = (
|
DB_URL = (
|
||||||
environ.get("DATABASE_URL", "").replace("postgres://", "postgresql://")
|
environ.get("DATABASE_URL", environ.get("DB_URL", "")).replace("postgres://", "postgresql://")
|
||||||
or environ.get("DB_URL", "").replace("postgres://", "postgresql://")
|
|
||||||
or "postgresql://postgres@localhost:5432/discoursio"
|
or "postgresql://postgres@localhost:5432/discoursio"
|
||||||
)
|
)
|
||||||
REDIS_URL = environ.get("REDIS_URL") or "redis://127.0.0.1"
|
REDIS_URL = environ.get("REDIS_URL") or "redis://127.0.0.1"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user