kopia lustrzana https://github.com/bugout-dev/moonstream
Added stream_processors submodule
Migrated streams route to use `ethereum_transaction` stream processor.pull/105/head
rodzic
3656a592ac
commit
5bd061a5da
|
|
@ -12,7 +12,7 @@ from moonstreamdb import db
|
||||||
from sqlalchemy.orm import Session
|
from sqlalchemy.orm import Session
|
||||||
|
|
||||||
|
|
||||||
from .. import actions
|
from ..stream_processors import ethereum_transaction
|
||||||
from .. import data
|
from .. import data
|
||||||
from ..middleware import BroodAuthMiddleware
|
from ..middleware import BroodAuthMiddleware
|
||||||
from ..settings import (
|
from ..settings import (
|
||||||
|
|
@ -96,7 +96,7 @@ async def search_transactions(
|
||||||
|
|
||||||
if address_to_subscriptions:
|
if address_to_subscriptions:
|
||||||
print("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,
|
db_session=db_session,
|
||||||
query=q,
|
query=q,
|
||||||
user_subscriptions_resources_by_address=address_to_subscriptions,
|
user_subscriptions_resources_by_address=address_to_subscriptions,
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,17 @@
|
||||||
from datetime import datetime
|
|
||||||
import logging
|
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 (
|
from moonstreamdb.models import (
|
||||||
EthereumBlock,
|
EthereumBlock,
|
||||||
EthereumTransaction,
|
EthereumTransaction,
|
||||||
EthereumPendingTransaction,
|
|
||||||
)
|
)
|
||||||
from sqlalchemy import or_, and_, text
|
from sqlalchemy import or_, and_, text
|
||||||
from sqlalchemy.orm import Session
|
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__)
|
logger = logging.getLogger(__name__)
|
||||||
Ładowanie…
Reference in New Issue