Skip to content

Commit

Permalink
Update grpc_getter.py (#157)
Browse files Browse the repository at this point in the history
* Update grpc_getter.py

* Fix formatting

* Update main.py
  • Loading branch information
Teddy-1000 authored Aug 14, 2024
1 parent 036aad1 commit 0ab7b8c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion api/grpc_getter.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
# Reuse channel and stub as much as possible, see https://grpc.io/docs/guides/performance/
@cache
def get_grpc_stub():
channel = grpc.aio.insecure_channel(f"{os.getenv('DSHOST', 'localhost')}:{os.getenv('DSPORT', '50050')}")
channel = grpc.aio.insecure_channel(
f"{os.getenv('DSHOST', 'localhost')}:{os.getenv('DSPORT', '50050')}",
options=[("grpc.max_receive_message_length ", int(os.getenv("GRPC_MAX_MESSAGE_SIZE", 4096)))],
)
return dstore_grpc.DatastoreStub(channel)


Expand Down
2 changes: 1 addition & 1 deletion ingest/api/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class Response(BaseModel):
"username": os.getenv("MQTT_USERNAME"),
"password": os.getenv("MQTT_PASSWORD"),
"enable_tls": os.getenv("MQTT_TLS", "False").lower() in ("true", "1", "t"),
"port": os.getenv("MQTT_PORT", 8883),
"port": int(os.getenv("MQTT_PORT", 8883)),
}


Expand Down

2 comments on commit 0ab7b8c

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

API Unit Test Coverage Report
FileStmtsMissCoverMissing
\_\_init\_\_.py00100% 
datastore_pb2.py645219%24–75
datastore_pb2_grpc.py432347%37–52, 85–87, 92–94, 99–101, 106–108, 112–136, 174, 191, 208, 225
grpc_getter.py201145%15–19, 23–26, 30–32, 36–38
locustfile.py15150%1–31
main.py41783%42, 47, 57, 67–68, 78–79
metadata_endpoints.py552456%42–51, 55, 82, 97–171, 175
response_classes.py50100% 
utilities.py802272%15, 33, 40, 62–65, 73–84, 89–96, 116, 120, 122
custom_geo_json
   edr_feature_collection.py60100% 
formatters
   \_\_init\_\_.py110100% 
   covjson.py54198%75
   geojson.py15287%17, 42
routers
   \_\_init\_\_.py00100% 
   edr.py93496%248–249, 308–309
   feature.py461959%75–108, 124–129, 135–157
TOTAL54818067% 

API Unit Test Coverage Summary

Tests Skipped Failures Errors Time
23 0 💤 0 ❌ 0 🔥 1.949s ⏱️

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

API Unit Test Coverage Report
FileStmtsMissCoverMissing
\_\_init\_\_.py00100% 
datastore_pb2.py645219%24–75
datastore_pb2_grpc.py432347%37–52, 85–87, 92–94, 99–101, 106–108, 112–136, 174, 191, 208, 225
grpc_getter.py201145%15–19, 23–26, 30–32, 36–38
locustfile.py15150%1–31
main.py41783%42, 47, 57, 67–68, 78–79
metadata_endpoints.py552456%42–51, 55, 82, 97–171, 175
response_classes.py50100% 
utilities.py802272%15, 33, 40, 62–65, 73–84, 89–96, 116, 120, 122
custom_geo_json
   edr_feature_collection.py60100% 
formatters
   \_\_init\_\_.py110100% 
   covjson.py54198%75
   geojson.py15287%17, 42
routers
   \_\_init\_\_.py00100% 
   edr.py93496%248–249, 308–309
   feature.py461959%75–108, 124–129, 135–157
TOTAL54818067% 

API Unit Test Coverage Summary

Tests Skipped Failures Errors Time
23 0 💤 0 ❌ 0 🔥 1.931s ⏱️

Please sign in to comment.