Skip to content

Commit

Permalink
fix:UUID generation and increase search timeout
Browse files Browse the repository at this point in the history
Removed an unnecessary tuple in UUID generation for row IDs in `public_gateway.py`, ensuring the ID is stored as a string. Increased the search query timeout from 10 to 100 seconds in `urls.py` to accommodate longer processing times.
  • Loading branch information
hareshkainthdbt committed Nov 21, 2024
1 parent 3667d67 commit 0afb66b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion orp/config/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def rebuild_cache(self, request, *args, **kwargs):
tx_begin = time.time()
try:
clear_all_documents()
config = SearchDocumentConfig(search_query="", timeout=10)
config = SearchDocumentConfig(search_query="", timeout=100)
Legislation().build_cache(config)
PublicGateway().build_cache(config)
except Exception as e:
Expand Down
2 changes: 1 addition & 1 deletion orp/orp_search/public_gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def build_cache(self, config):
row["date_valid"] = convert_date_string_to_obj(
row.get("date_valid")
)
row["id"] = (generate_short_uuid(),)
row["id"] = generate_short_uuid()

row["publisher_id"] = (
None
Expand Down

0 comments on commit 0afb66b

Please sign in to comment.