testcase_ceoec/api/actions/metrics_url.py

16 lines
412 B
Python

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