Skip to content

Commit

Permalink
Retrieval Service efficiency optimization (#13543)
Browse files Browse the repository at this point in the history
  • Loading branch information
charli117 authored Feb 17, 2025
1 parent 566e548 commit 222df44
Show file tree
Hide file tree
Showing 2 changed files with 170 additions and 124 deletions.
6 changes: 6 additions & 0 deletions api/configs/middleware/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
from typing import Any, Literal, Optional
from urllib.parse import quote_plus

Expand Down Expand Up @@ -166,6 +167,11 @@ def SQLALCHEMY_DATABASE_URI(self) -> str:
default=False,
)

RETRIEVAL_SERVICE_WORKER: NonNegativeInt = Field(
description="If True, enables the retrieval service worker.",
default=os.cpu_count(),
)

@computed_field
def SQLALCHEMY_ENGINE_OPTIONS(self) -> dict[str, Any]:
return {
Expand Down
Loading

0 comments on commit 222df44

Please sign in to comment.