testcase stage2

This commit is contained in:
2024-07-05 00:24:49 +03:00
commit 8ccc0f0ce0
3 changed files with 223 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
from db.dals import MetricDAL
async def _add_new_metrics(urls, session):
async with session() as s:
order_dal = MetricDAL(s)
order_id = await order_dal.add_new_metrics(urls)
return order_id
async def _get_metrics_last_date(session):
async with session() as s:
order_dal = MetricDAL(s)
order_id = await order_dal.get_last_metrics_date()
return order_id