From 26fdf21854eeca9259808a49aa316624a2c64745 Mon Sep 17 00:00:00 2001 From: harisang Date: Tue, 5 Mar 2024 02:40:17 +0200 Subject: [PATCH 1/2] comment out warehouse related parts --- .github/workflows/pull-request.yaml | 1 - src/main.py | 15 ++++++++------- tests/integration/test_warehouse_fetcher.py | 3 ++- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/pull-request.yaml b/.github/workflows/pull-request.yaml index 1d796116..5a84816f 100644 --- a/.github/workflows/pull-request.yaml +++ b/.github/workflows/pull-request.yaml @@ -49,4 +49,3 @@ jobs: env: PROD_DB_URL: ${{ secrets.PROD_DB_URL }} BARN_DB_URL: ${{ secrets.BARN_DB_URL }} - WAREHOUSE_URL: ${{ secrets.WAREHOUSE_URL }} diff --git a/src/main.py b/src/main.py index 834ca3c1..50defca7 100644 --- a/src/main.py +++ b/src/main.py @@ -84,12 +84,13 @@ def __init__(self) -> None: fetcher=OrderbookFetcher(), dry_run=args.dry_run, ) - elif args.sync_table == SyncTable.INTERNAL_IMBALANCE: - sync_internal_imbalance( - aws, - config=SyncConfig(volume_path), - fetcher=PostgresFetcher(os.environ["WAREHOUSE_URL"]), - dry_run=args.dry_run, - ) + # Internal imbalances job is officially paused + # elif args.sync_table == SyncTable.INTERNAL_IMBALANCE: + # sync_internal_imbalance( + # aws, + # config=SyncConfig(volume_path), + # #fetcher=PostgresFetcher(os.environ["WAREHOUSE_URL"]), + # dry_run=args.dry_run, + # ) else: log.error(f"unsupported sync_table '{args.sync_table}'") diff --git a/tests/integration/test_warehouse_fetcher.py b/tests/integration/test_warehouse_fetcher.py index a832e2d5..e8fad18a 100644 --- a/tests/integration/test_warehouse_fetcher.py +++ b/tests/integration/test_warehouse_fetcher.py @@ -8,11 +8,12 @@ from src.models.block_range import BlockRange +@unittest.skip("skipping") class TestPostgresWarehouseFetching(unittest.TestCase): def setUp(self) -> None: load_dotenv() # TODO - deploy test DB and populate with some records... - self.fetcher = PostgresFetcher(db_url=os.environ["WAREHOUSE_URL"]) + # self.fetcher = PostgresFetcher(db_url=os.environ["WAREHOUSE_URL"]) def test_latest_block_reasonable(self): self.assertGreater(self.fetcher.get_latest_block(), 17273090) From 2c3492da6e9ac01fcfd61d2d74ae1932a2342c5b Mon Sep 17 00:00:00 2001 From: harisang Date: Tue, 5 Mar 2024 02:43:54 +0200 Subject: [PATCH 2/2] some pylint fixes --- src/main.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main.py b/src/main.py index 50defca7..d5a3dce3 100644 --- a/src/main.py +++ b/src/main.py @@ -9,14 +9,12 @@ from src.fetch.dune import DuneFetcher from src.fetch.orderbook import OrderbookFetcher -from src.fetch.postgres import PostgresFetcher from src.logger import set_log from src.models.tables import SyncTable from src.post.aws import AWSClient from src.sync import sync_app_data from src.sync.config import SyncConfig, AppDataSyncConfig from src.sync.order_rewards import sync_order_rewards, sync_batch_rewards -from src.sync.token_imbalance import sync_internal_imbalance log = set_log(__name__) @@ -89,7 +87,7 @@ def __init__(self) -> None: # sync_internal_imbalance( # aws, # config=SyncConfig(volume_path), - # #fetcher=PostgresFetcher(os.environ["WAREHOUSE_URL"]), + # fetcher=PostgresFetcher(os.environ["WAREHOUSE_URL"]), # dry_run=args.dry_run, # ) else: