Await task HistoricalPriceTask._load() and adjust Dockerfile to expose
port 1337
This commit is contained in:
parent
134d897b8a
commit
28fdf41aad
|
@ -7,4 +7,4 @@ RUN pip install -r requirements.txt
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
EXPOSE 1337
|
EXPOSE 1337
|
||||||
CMD ["hypercorn", "--access-logfile", "-", "--workers", "1", "--bind", "0.0.0.0:18200", "asgi:app"]
|
CMD ["hypercorn", "--access-logfile", "-", "--workers", "1", "--bind", "0.0.0.0:1337", "asgi:app"]
|
|
@ -2,6 +2,7 @@
|
||||||
# Copyright (c) 2020, The Monero Project.
|
# Copyright (c) 2020, The Monero Project.
|
||||||
# Copyright (c) 2020, dsc@xmr.pm
|
# Copyright (c) 2020, dsc@xmr.pm
|
||||||
|
|
||||||
|
import asyncio
|
||||||
import os
|
import os
|
||||||
import json
|
import json
|
||||||
from typing import List, Union
|
from typing import List, Union
|
||||||
|
@ -33,7 +34,7 @@ class HistoricalPriceTask(FeatherTask):
|
||||||
|
|
||||||
self._year_genesis = int(settings.COIN_GENESIS_DATE[:4])
|
self._year_genesis = int(settings.COIN_GENESIS_DATE[:4])
|
||||||
|
|
||||||
self._load()
|
asyncio.create_task(self._load())
|
||||||
|
|
||||||
async def task(self) -> Union[dict, None]:
|
async def task(self) -> Union[dict, None]:
|
||||||
content = await httpget(self._http_endpoint, json=True, raise_for_status=False)
|
content = await httpget(self._http_endpoint, json=True, raise_for_status=False)
|
||||||
|
|
Loading…
Reference in New Issue