Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Input REST Souce Stage to have pipeline support #1240

Closed
wants to merge 2 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
5 changes: 4 additions & 1 deletion morpheus/stages/input/http_client_source_stage.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import cudf

from morpheus.cli.register_stage import register_stage
from morpheus.config import PipelineModes
from morpheus.config import Config
from morpheus.messages import MessageMeta
from morpheus.pipeline.preallocator_mixin import PreallocatorMixin
Expand All @@ -34,7 +35,9 @@
logger = logging.getLogger(__name__)


@register_stage("from-http-client", ignore_args=["query_params", "headers", "**request_kwargs"])
@register_stage("from-http-client",
modes=[PipelineModes.FIL, PipelineModes.NLP, PipelineModes.OTHER],
ignore_args=["query_params", "headers", "**request_kwargs"])
class HttpClientSourceStage(PreallocatorMixin, SingleOutputSource):
"""
Source stage that polls a remote HTTP server for incoming data.
Expand Down
3 changes: 2 additions & 1 deletion morpheus/stages/input/http_server_source_stage.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import cudf

from morpheus.cli.register_stage import register_stage
from morpheus.config import PipelineModes
from morpheus.config import Config
from morpheus.messages import MessageMeta
from morpheus.pipeline.preallocator_mixin import PreallocatorMixin
Expand All @@ -40,7 +41,7 @@
SUPPORTED_METHODS = (HTTPMethod.POST, HTTPMethod.PUT)


@register_stage("from-http")
@register_stage("from-http", modes=[PipelineModes.FIL, PipelineModes.NLP, PipelineModes.OTHER])
class HttpServerSourceStage(PreallocatorMixin, SingleOutputSource):
"""
Source stage that starts an HTTP server and listens for incoming requests on a specified endpoint.
Expand Down