Skip to content

Commit

Permalink
Remove unused env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
msosav committed Apr 10, 2024
1 parent 8a18a82 commit 5dd9f7d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
5 changes: 1 addition & 4 deletions Cliente/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,4 @@ RUN pip install pipenv
RUN pipenv install --deploy --ignore-pipfile

ARG SERVER_IP
ENV SERVER_IP $SERVER_IP

ARG SERVER_PORT
ENV SERVER_PORT $SERVER_PORT
ENV SERVER_IP $SERVER_IP
7 changes: 3 additions & 4 deletions Cliente/cliente.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,14 @@
dotenv.load_dotenv()

SERVER_IP = os.getenv("SERVER_IP")
SERVER_PORT = os.getenv("SERVER_PORT")


def list_files():
"""
Lista los archivos
return: None
"""
channel = grpc.insecure_channel(f"{SERVER_IP}:{SERVER_PORT}")
channel = grpc.insecure_channel(f"{SERVER_IP}:8080")
stub = Service_pb2_grpc.NameNodeStub(channel)
response = stub.ListFiles(Service_pb2.ListFilesRequest())
files = response.files
Expand Down Expand Up @@ -99,7 +98,7 @@ def upload_file(file_name, num_partitions, size):
param size: El tamaño del archivo
return: None
"""
channel = grpc.insecure_channel(f"{SERVER_IP}:{SERVER_PORT}")
channel = grpc.insecure_channel(f"{SERVER_IP}:8080")
stub = Service_pb2_grpc.NameNodeStub(channel)
response = stub.Create(
Service_pb2.CreateRequest(
Expand Down Expand Up @@ -141,7 +140,7 @@ def upload_file(file_name, num_partitions, size):


def download_file(file_name):
channel = grpc.insecure_channel(f"{SERVER_IP}:{SERVER_PORT}")
channel = grpc.insecure_channel(f"{SERVER_IP}:8080")
stub = Service_pb2_grpc.NameNodeStub(channel)
response = stub.Download(Service_pb2.DownloadRequest(file_name=file_name))
partitions = response.partitions
Expand Down

0 comments on commit 5dd9f7d

Please sign in to comment.