Skip to content

Commit

Permalink
Merge pull request #857 from wangxinbiao/main
Browse files Browse the repository at this point in the history
fix:Convert chunkSize and worker values to int type.
  • Loading branch information
bjwswang authored Mar 14, 2024
2 parents 9bc7c15 + a9cdc58 commit 6a51ea9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions pypi/data-processing/src/common/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,13 @@ def __set_property_value(self):
namespace=k8s_pod_namespace, config_map_name=k8s_default_config
)
# chunk size
self.knowledge_chunk_size = dataprocess.get("chunkSize", 500)
chunkSize = dataprocess.get("chunkSize", 500)
self.knowledge_chunk_size = int(chunkSize)
# chunk overlap
self.knowledge_chunk_overlap = 50
# worker
self.worker = dataprocess.get("worker", 1)
worker = dataprocess.get("worker", 1)
self.workers = int(worker)

# backend PostgreSQL
postgresql_config = postgresql_cr.get_postgresql_config_in_k8s_configmap(
Expand Down
2 changes: 1 addition & 1 deletion pypi/data-processing/src/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,4 @@ def _create_database_connection():


if __name__ == "__main__":
sanic_app.run(host="0.0.0.0", port=28888, access_log=False, debug=False, workers=config.worker)
sanic_app.run(host="0.0.0.0", port=28888, access_log=False, debug=False, workers=config.workers)

0 comments on commit 6a51ea9

Please sign in to comment.