forked from retoor/devplacepy
feat: add reactions, bookmarks, polls modules with session remember config
Add three new feature modules (reactions, bookmarks, polls) with corresponding database tables, indexes, and router registrations. Introduce `SESSION_MAX_AGE_REMEMBER` config for extended session duration, add `get_unread_messages` template global, and include operational defaults for rate limiting and session settings in `site_settings`.
This commit is contained in:
@@ -5,7 +5,7 @@ from datetime import datetime, timezone
|
||||
|
||||
import httpx
|
||||
|
||||
from devplacepy.database import get_table, get_setting
|
||||
from devplacepy.database import get_table, get_setting, get_int_setting
|
||||
from devplacepy.services.base import BaseService
|
||||
from devplacepy.utils import generate_uid, make_combined_slug, strip_html
|
||||
|
||||
@@ -68,6 +68,7 @@ class NewsService(BaseService):
|
||||
super().__init__(name="news", interval_seconds=3600)
|
||||
|
||||
async def run_once(self) -> None:
|
||||
self.interval_seconds = max(60, get_int_setting("news_service_interval", 3600))
|
||||
api_url = get_setting("news_api_url", NEWS_API_URL_DEFAULT)
|
||||
ai_url = get_setting("news_ai_url", AI_URL_DEFAULT)
|
||||
ai_model = get_setting("news_ai_model", AI_MODEL_DEFAULT)
|
||||
|
||||
Reference in New Issue
Block a user