mirror of
https://git.wownero.com/wowlet/wowlet-backend.git
synced 2024-08-15 01:03:13 +00:00
Await task HistoricalPriceTask._load() and adjust Dockerfile to expose
port 1337
This commit is contained in:
parent
134d897b8a
commit
28fdf41aad
2 changed files with 3 additions and 2 deletions
|
@ -7,4 +7,4 @@ RUN pip install -r requirements.txt
|
|||
COPY . .
|
||||
|
||||
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, dsc@xmr.pm
|
||||
|
||||
import asyncio
|
||||
import os
|
||||
import json
|
||||
from typing import List, Union
|
||||
|
@ -33,7 +34,7 @@ class HistoricalPriceTask(FeatherTask):
|
|||
|
||||
self._year_genesis = int(settings.COIN_GENESIS_DATE[:4])
|
||||
|
||||
self._load()
|
||||
asyncio.create_task(self._load())
|
||||
|
||||
async def task(self) -> Union[dict, None]:
|
||||
content = await httpget(self._http_endpoint, json=True, raise_for_status=False)
|
||||
|
|
Loading…
Reference in a new issue