mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-25 19:15:18 +02:00
feat(fix): add PAGES_LIMIT configuration for ETL services
This commit is contained in:
parent
0c6a519c37
commit
3207fbf9ea
5 changed files with 11 additions and 2 deletions
|
|
@ -78,6 +78,10 @@ STT_SERVICE=local/base
|
|||
# STT_SERVICE_API_BASE=
|
||||
|
||||
|
||||
# (Optional) Maximum pages limit per user for ETL services (default: `999999999` for unlimited in OSS version)
|
||||
PAGES_LIMIT=500
|
||||
|
||||
|
||||
FIRECRAWL_API_KEY=fcr-01J0000000000000000000000
|
||||
|
||||
# File Parser Service
|
||||
|
|
|
|||
|
|
@ -200,6 +200,9 @@ class Config:
|
|||
# ETL Service
|
||||
ETL_SERVICE = os.getenv("ETL_SERVICE")
|
||||
|
||||
# Pages limit for ETL services (default to very high number for OSS unlimited usage)
|
||||
PAGES_LIMIT = int(os.getenv("PAGES_LIMIT", "999999999"))
|
||||
|
||||
if ETL_SERVICE == "UNSTRUCTURED":
|
||||
# Unstructured API Key
|
||||
UNSTRUCTURED_API_KEY = os.getenv("UNSTRUCTURED_API_KEY")
|
||||
|
|
|
|||
|
|
@ -710,7 +710,7 @@ if config.AUTH_TYPE == "GOOGLE":
|
|||
)
|
||||
|
||||
# Page usage tracking for ETL services
|
||||
pages_limit = Column(Integer, nullable=False, default=500, server_default="500")
|
||||
pages_limit = Column(Integer, nullable=False, default=config.PAGES_LIMIT, server_default=str(config.PAGES_LIMIT))
|
||||
pages_used = Column(Integer, nullable=False, default=0, server_default="0")
|
||||
|
||||
else:
|
||||
|
|
@ -731,7 +731,7 @@ else:
|
|||
)
|
||||
|
||||
# Page usage tracking for ETL services
|
||||
pages_limit = Column(Integer, nullable=False, default=500, server_default="500")
|
||||
pages_limit = Column(Integer, nullable=False, default=config.PAGES_LIMIT, server_default=str(config.PAGES_LIMIT))
|
||||
pages_used = Column(Integer, nullable=False, default=0, server_default="0")
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -229,6 +229,7 @@ Before you begin, ensure you have:
|
|||
| CELERY_RESULT_BACKEND | Redis connection URL for Celery result backend (e.g., `redis://localhost:6379/0`) |
|
||||
| SCHEDULE_CHECKER_INTERVAL | (Optional) How often to check for scheduled connector tasks. Format: `<number><unit>` where unit is `m` (minutes) or `h` (hours). Examples: `1m`, `5m`, `1h`, `2h` (default: `1m`) |
|
||||
| REGISTRATION_ENABLED | (Optional) Enable or disable new user registration (e.g., `TRUE` or `FALSE`, default: `TRUE`) |
|
||||
| PAGES_LIMIT | (Optional) Maximum pages limit per user for ETL services (default: `999999999` for unlimited in OSS version) |
|
||||
|
||||
|
||||
**Optional Backend LangSmith Observability:**
|
||||
|
|
|
|||
|
|
@ -89,6 +89,7 @@ Edit the `.env` file and set the following variables:
|
|||
| CELERY_RESULT_BACKEND | Redis connection URL for Celery result backend (e.g., `redis://localhost:6379/0`) |
|
||||
| SCHEDULE_CHECKER_INTERVAL | (Optional) How often to check for scheduled connector tasks. Format: `<number><unit>` where unit is `m` (minutes) or `h` (hours). Examples: `1m`, `5m`, `1h`, `2h` (default: `1m`) |
|
||||
| REGISTRATION_ENABLED | (Optional) Enable or disable new user registration (e.g., `TRUE` or `FALSE`, default: `TRUE`) |
|
||||
| PAGES_LIMIT | (Optional) Maximum pages limit per user for ETL services (default: `999999999` for unlimited in OSS version) |
|
||||
|
||||
|
||||
**(Optional) Backend LangSmith Observability:**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue