[+] fix not frozen Market rows
This commit is contained in:
parent
070a63222c
commit
92a9f36acd
2
deps/test-task-2025-06-30-v1/python/online/fxreader/pr34/test_task_2025_06_30_v1/async_api/app.py
vendored
2
deps/test-task-2025-06-30-v1/python/online/fxreader/pr34/test_task_2025_06_30_v1/async_api/app.py
vendored
@ -39,7 +39,7 @@ async def run() -> None:
|
|||||||
session,
|
session,
|
||||||
[
|
[
|
||||||
Ticker(
|
Ticker(
|
||||||
id=markets[rate.symbol].id,
|
id=markets[rate.symbol],
|
||||||
timestamp=timestamp,
|
timestamp=timestamp,
|
||||||
value=rate.value,
|
value=rate.value,
|
||||||
)
|
)
|
||||||
|
6
deps/test-task-2025-06-30-v1/python/online/fxreader/pr34/test_task_2025_06_30_v1/tickers/logic.py
vendored
6
deps/test-task-2025-06-30-v1/python/online/fxreader/pr34/test_task_2025_06_30_v1/tickers/logic.py
vendored
@ -7,8 +7,8 @@ from .utils import get_or_create
|
|||||||
async def markets_get_by_symbol(
|
async def markets_get_by_symbol(
|
||||||
session: 'async_sessionmaker[AsyncSession]',
|
session: 'async_sessionmaker[AsyncSession]',
|
||||||
symbols: set[str],
|
symbols: set[str],
|
||||||
) -> dict[str, Market]:
|
) -> dict[str, int]:
|
||||||
res : dict[str, Market] = dict()
|
res : dict[str, int] = dict()
|
||||||
|
|
||||||
async with session() as active_session:
|
async with session() as active_session:
|
||||||
async with active_session.begin() as transaction:
|
async with active_session.begin() as transaction:
|
||||||
@ -18,7 +18,7 @@ async def markets_get_by_symbol(
|
|||||||
Market,
|
Market,
|
||||||
name=o,
|
name=o,
|
||||||
))[0]
|
))[0]
|
||||||
res[o] = m
|
res[o] = m.id
|
||||||
|
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user