diff --git a/safeshare/requirements.txt b/safeshare/requirements.txt index 1558671..8d5c0b8 100644 --- a/safeshare/requirements.txt +++ b/safeshare/requirements.txt @@ -3,6 +3,8 @@ argon2-cffi==23.1.0 argon2-cffi-bindings==21.2.0 asgiref==3.7.2 boto==2.49.0 +boto3==1.28.74 +botocore==1.31.74 certifi==2023.7.22 cffi==1.16.0 charset-normalizer==3.2.0 @@ -22,6 +24,7 @@ inflect==7.0.0 inflection==0.5.1 install==1.3.5 isort==5.12.0 +jmespath==1.0.1 mysqlclient==2.2.0 packaging==23.2 protobuf==4.24.4 @@ -31,11 +34,15 @@ pydantic==2.4.2 pydantic_core==2.10.1 PyJWT==1.7.1 PyMySQL==1.1.0 +python-dateutil==2.8.2 +python-environ==0.4.54 python-magic==0.4.27 pytz==2023.3.post1 PyYAML==6.0.1 redis==5.0.1 requests==2.31.0 +s3transfer==0.7.0 +six==1.16.0 sqlparse==0.4.4 typing_extensions==4.8.0 uritemplate==4.1.1 diff --git a/safeshare/safeshare_app/utils/safeshare_vdb_client/client.py b/safeshare/safeshare_app/utils/safeshare_vdb_client/client.py index 0d49a1f..391e4a4 100644 --- a/safeshare/safeshare_app/utils/safeshare_vdb_client/client.py +++ b/safeshare/safeshare_app/utils/safeshare_vdb_client/client.py @@ -5,7 +5,7 @@ import dynamo_pb2_grpc as pb2_grpc class Client: def __init__(self): - self.channel = grpc.insecure_channel("http://safeshare-virus:50051") + self.channel = grpc.insecure_channel("localhost:50051") self.stub = pb2_grpc.Dynamo_DBStub(self.channel) def CheckFile(self, sha_256_id: str): diff --git a/safeshare/safeshare_app/views/file.py b/safeshare/safeshare_app/views/file.py index 0f103f9..3e5ac89 100644 --- a/safeshare/safeshare_app/views/file.py +++ b/safeshare/safeshare_app/views/file.py @@ -80,8 +80,10 @@ class ManageItemsView(APIView): try: grpc_client = client.Client() - result = grpc_client.CheckFile(hash_signature, timeout=10) + print(f'Checking file {filename} with hash signature {hash_signature}') + result = grpc_client.CheckFile(hash_signature) except Exception as e: + print(f'Error checking file: {str(e)}') result = False if result: