diff --git a/backend/moonstream/routes/streams.py b/backend/moonstream/routes/streams.py index 58e0b9a0..9f0436c7 100644 --- a/backend/moonstream/routes/streams.py +++ b/backend/moonstream/routes/streams.py @@ -12,7 +12,7 @@ from moonstreamdb import db from sqlalchemy.orm import Session -from .. import actions +from ..stream_processors import ethereum_transaction from .. import data from ..middleware import BroodAuthMiddleware from ..settings import ( @@ -96,7 +96,7 @@ async def search_transactions( if address_to_subscriptions: print("address_to_subscriptions") - response = await actions.get_transaction_in_blocks( + response = await ethereum_transaction.get_transaction_in_blocks( db_session=db_session, query=q, user_subscriptions_resources_by_address=address_to_subscriptions, diff --git a/backend/moonstream/stream_processors/__init__.py b/backend/moonstream/stream_processors/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/backend/moonstream/actions.py b/backend/moonstream/stream_processors/ethereum_transaction.py similarity index 97% rename from backend/moonstream/actions.py rename to backend/moonstream/stream_processors/ethereum_transaction.py index e62ff553..16f36d9f 100644 --- a/backend/moonstream/actions.py +++ b/backend/moonstream/stream_processors/ethereum_transaction.py @@ -1,21 +1,17 @@ -from datetime import datetime import logging +from typing import Dict, Any, List -from typing import Dict, Any, List, Optional, Union - -from sqlalchemy.engine.base import Transaction from moonstreamdb.models import ( EthereumBlock, EthereumTransaction, - EthereumPendingTransaction, ) from sqlalchemy import or_, and_, text from sqlalchemy.orm import Session -from . import data +from .. import data -from .settings import DEFAULT_STREAM_TIMEINTERVAL +from ..settings import DEFAULT_STREAM_TIMEINTERVAL logger = logging.getLogger(__name__)