Skip to content

Commit

Permalink
fix: remove rpc server
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunato committed Feb 6, 2024
1 parent 748e34e commit dfbf56f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 38 deletions.
1 change: 0 additions & 1 deletion docs/cli_user_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ Then you can start playing with it:
list List supported product types
search Search satellite images by their product types,...
serve-rest Start eodag HTTP server
serve-rpc Start eodag rpc server
version Print eodag version and exit
* Each command has its own help, see for instance the help of the ``list`` command with ``eodag list --help``:
Expand Down
37 changes: 0 additions & 37 deletions eodag/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
list List supported product types
search Search satellite images by their product types,...
serve-rest Start eodag HTTP server
serve-rpc Start eodag rpc server
version Print eodag version and exit
noqa: D103
Expand Down Expand Up @@ -589,42 +588,6 @@ def download(ctx: Context, **kwargs: Any) -> None:
)


@eodag.command(help="Start eodag rpc server")
@click.option(
"-h",
"--host",
type=click.STRING,
default="localhost",
help="Interface where to listen for requests",
)
@click.option(
"-p",
"--port",
type=click.INT,
default=50051,
help="The port where to listen for requests",
)
@click.option(
"-f",
"--conf",
type=click.Path(exists=True),
help="File path to the user configuration file with its credentials",
)
@click.pass_context
def serve_rpc(ctx: Context, host: str, port: int, conf: str) -> None:
"""Serve EODAG functionalities through a RPC interface"""
setup_logging(verbose=ctx.obj["verbosity"])
try:
from eodag_cube.rpc.server import EODAGRPCServer
except ImportError:
raise NotImplementedError(
"eodag-cube needed for this functionnality, install using `pip install eodag-cube`"
)

server = EODAGRPCServer(host, port, conf)
server.serve()


@eodag.command(
help="Start eodag HTTP server\n\n"
"Set EODAG_CORS_ALLOWED_ORIGINS environment variable to configure Cross-Origin Resource Sharing allowed origins as "
Expand Down

0 comments on commit dfbf56f

Please sign in to comment.