Skip to content
This repository has been archived by the owner on Dec 20, 2024. It is now read-only.

Comment out warehouse related parts #86

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
17 changes: 8 additions & 9 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)

Expand Down Expand Up @@ -84,12 +82,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}'")
3 changes: 2 additions & 1 deletion tests/integration/test_warehouse_fetcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading