Skip to content

Commit

Permalink
chore: remove useless code
Browse files Browse the repository at this point in the history
  • Loading branch information
Lancetnik committed Dec 4, 2024
1 parent 7eb491c commit f010bd3
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 104 deletions.
29 changes: 0 additions & 29 deletions faststream/nats/subscriber/usecases/core_subscriber.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,35 +131,6 @@ def get_log_context(


class ConcurrentCoreSubscriber(ConcurrentMixin["Msg"], CoreSubscriber):
def __init__(
self,
*,
max_workers: int,
# default args
subject: str,
config: "ConsumerConfig",
queue: str,
extra_options: Optional["AnyDict"],
# Subscriber args
ack_policy: AckPolicy,
no_reply: bool,
broker_dependencies: Iterable["Dependant"],
broker_middlewares: Iterable["BrokerMiddleware[Msg]"],
) -> None:
super().__init__(
max_workers=max_workers,
# basic args
subject=subject,
config=config,
queue=queue,
extra_options=extra_options,
# Propagated args
ack_policy=ack_policy,
no_reply=no_reply,
broker_middlewares=broker_middlewares,
broker_dependencies=broker_dependencies,
)

@override
async def _create_subscription(self) -> None:
"""Create NATS subscription and start consume task."""
Expand Down
31 changes: 0 additions & 31 deletions faststream/nats/subscriber/usecases/stream_pull_subscriber.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,37 +110,6 @@ async def _consume_pull(


class ConcurrentPullStreamSubscriber(ConcurrentMixin["Msg"], PullStreamSubscriber):
def __init__(
self,
*,
max_workers: int,
# default args
pull_sub: "PullSub",
stream: "JStream",
subject: str,
config: "ConsumerConfig",
extra_options: Optional["AnyDict"],
# Subscriber args
ack_policy: "AckPolicy",
no_reply: bool,
broker_dependencies: Iterable["Dependant"],
broker_middlewares: Iterable["BrokerMiddleware[Msg]"],
) -> None:
super().__init__(
max_workers=max_workers,
# basic args
pull_sub=pull_sub,
stream=stream,
subject=subject,
config=config,
extra_options=extra_options,
# Propagated args
ack_policy=ack_policy,
no_reply=no_reply,
broker_middlewares=broker_middlewares,
broker_dependencies=broker_dependencies,
)

@override
async def _create_subscription(self) -> None:
"""Create NATS subscription and start consume task."""
Expand Down
44 changes: 0 additions & 44 deletions faststream/nats/subscriber/usecases/stream_push_subscriber.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from collections.abc import Iterable
from typing import (
TYPE_CHECKING,
Optional,
Expand All @@ -11,19 +10,7 @@
from .stream_basic import StreamSubscriber

if TYPE_CHECKING:
from fast_depends.dependencies import Dependant
from nats.aio.msg import Msg
from nats.js import JetStreamContext
from nats.js.api import ConsumerConfig

from faststream._internal.basic_types import (
AnyDict,
)
from faststream._internal.types import (
BrokerMiddleware,
)
from faststream.middlewares import AckPolicy
from faststream.nats.schemas import JStream


class PushStreamSubscription(StreamSubscriber):
Expand All @@ -47,37 +34,6 @@ async def _create_subscription(self) -> None:
class ConcurrentPushStreamSubscriber(ConcurrentMixin["Msg"], StreamSubscriber):
subscription: Optional["JetStreamContext.PushSubscription"]

def __init__(
self,
*,
max_workers: int,
stream: "JStream",
# default args
subject: str,
config: "ConsumerConfig",
queue: str,
extra_options: Optional["AnyDict"],
# Subscriber args
ack_policy: "AckPolicy",
no_reply: bool,
broker_dependencies: Iterable["Dependant"],
broker_middlewares: Iterable["BrokerMiddleware[Msg]"],
) -> None:
super().__init__(
max_workers=max_workers,
# basic args
stream=stream,
subject=subject,
config=config,
queue=queue,
extra_options=extra_options,
# Propagated args
ack_policy=ack_policy,
no_reply=no_reply,
broker_middlewares=broker_middlewares,
broker_dependencies=broker_dependencies,
)

@override
async def _create_subscription(self) -> None:
"""Create NATS subscription and start consume task."""
Expand Down

0 comments on commit f010bd3

Please sign in to comment.