nikeshn commited on
Commit
dcee2aa
·
verified ·
1 Parent(s): b16ead6

Update src/config.py

Browse files
Files changed (1) hide show
  1. src/config.py +7 -2
src/config.py CHANGED
@@ -6,7 +6,7 @@ from pydantic_settings import BaseSettings, SettingsConfigDict
6
 
7
  # Single source of truth for the deployed version. app.py, admin.py and all
8
  # outbound User-Agent strings read this constant - never hardcode versions elsewhere.
9
- LIBBEE_VERSION = "3.9.1"
10
 
11
  class Settings(BaseSettings):
12
  model_config = SettingsConfigDict(
@@ -36,6 +36,11 @@ class Settings(BaseSettings):
36
  # Shared-secret bearer token for the Worker analytics endpoints (/log, /analytics*, /reports*).
37
  # Must match the ANALYTICS_TOKEN secret configured on the Cloudflare Worker.
38
  cloudflare_worker_token: str = ""
 
 
 
 
 
39
  # Contact for polite-pool identification with open scholarly APIs (OpenAlex, Unpaywall, Crossref).
40
  contact_email: str = "libse@ku.ac.ae"
41
 
@@ -86,4 +91,4 @@ def get_settings() -> Settings:
86
  settings = Settings()
87
  settings.runtime_path.mkdir(parents=True, exist_ok=True)
88
  settings.rag_cache_dir.mkdir(parents=True, exist_ok=True)
89
- return settings
 
6
 
7
  # Single source of truth for the deployed version. app.py, admin.py and all
8
  # outbound User-Agent strings read this constant - never hardcode versions elsewhere.
9
+ LIBBEE_VERSION = "3.9.2"
10
 
11
  class Settings(BaseSettings):
12
  model_config = SettingsConfigDict(
 
36
  # Shared-secret bearer token for the Worker analytics endpoints (/log, /analytics*, /reports*).
37
  # Must match the ANALYTICS_TOKEN secret configured on the Cloudflare Worker.
38
  cloudflare_worker_token: str = ""
39
+ # From v3.9.2 the browser writes analytics directly to the Worker, because
40
+ # this host's egress to workers.dev fails intermittently. Set
41
+ # ANALYTICS_CLIENT_SIDE=false to fall back to server-side logging (which
42
+ # still buffers and retries) if the frontend cannot be updated.
43
+ analytics_client_side: bool = True
44
  # Contact for polite-pool identification with open scholarly APIs (OpenAlex, Unpaywall, Crossref).
45
  contact_email: str = "libse@ku.ac.ae"
46
 
 
91
  settings = Settings()
92
  settings.runtime_path.mkdir(parents=True, exist_ok=True)
93
  settings.rag_cache_dir.mkdir(parents=True, exist_ok=True)
94
+ return settings