From b12fb0f330e0a772e67d4f0be9cdaf1662798bcf Mon Sep 17 00:00:00 2001 From: Andrey Date: Wed, 27 Nov 2024 18:14:53 +0200 Subject: [PATCH] Update egine. --- crawlers/mooncrawl/mooncrawl/db.py | 2 +- crawlers/mooncrawl/mooncrawl/stats_worker/queries.py | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/crawlers/mooncrawl/mooncrawl/db.py b/crawlers/mooncrawl/mooncrawl/db.py index cb22baf7..53b6df68 100644 --- a/crawlers/mooncrawl/mooncrawl/db.py +++ b/crawlers/mooncrawl/mooncrawl/db.py @@ -7,7 +7,7 @@ MOONSTREAM_POOL_SIZE, create_moonstream_engine, ) -from moonstreamdbv3.db import MoonstreamCustomDBEngine +from moonstreamdbv3.db import DBEngine from sqlalchemy.orm import Session, sessionmaker from .settings import ( diff --git a/crawlers/mooncrawl/mooncrawl/stats_worker/queries.py b/crawlers/mooncrawl/mooncrawl/stats_worker/queries.py index f2178d06..ca6c7cce 100644 --- a/crawlers/mooncrawl/mooncrawl/stats_worker/queries.py +++ b/crawlers/mooncrawl/mooncrawl/stats_worker/queries.py @@ -15,7 +15,7 @@ from ..db import ( RO_pre_ping_query_engine, MOONSTREAM_DB_URI_READ_ONLY, - MoonstreamCustomDBEngine, + DBEngine, ) from ..reporter import reporter from ..settings import ( @@ -85,9 +85,7 @@ def data_generate( db_uri = get_customer_db_uri(customer_id, instance_id, "customer") label = SEER_CRAWLER_LABEL - engine = MoonstreamCustomDBEngine( - url=db_uri, schema=MOONSTREAM_DB_V3_SCHEMA_NAME - ) + engine = DBEngine(url=db_uri, schema=MOONSTREAM_DB_V3_SCHEMA_NAME).engine else: engine = RO_pre_ping_query_engine