Enhance caching mechanism and logging configuration
- Updated .gitignore to include additional IDE and OS files, as well as log and web build directories. - Expanded config.sample.yaml to include cache configuration options for memory and Redis. - Modified wallamonitor.py to load cache configuration and initialize ArticleCache. - Refactored QueueManager to utilize ArticleCache for tracking notified articles. - Improved logging setup to dynamically determine log file path based on environment.
This commit is contained in:
@@ -1,2 +1,20 @@
|
||||
telegram_token: ""
|
||||
telegram_channel: "@canal_o_grupo"
|
||||
|
||||
# Configuración del cache de artículos notificados
|
||||
# cache_type: "memory" o "redis"
|
||||
# - "memory": Almacena en memoria (no requiere Redis, limitado por el límite configurado)
|
||||
# - "redis": Almacena en Redis (requiere servidor Redis, ilimitado con TTL de 7 días)
|
||||
cache:
|
||||
type: "memory" # "memory" o "redis"
|
||||
|
||||
# Configuración para cache en memoria
|
||||
memory:
|
||||
limit: 300 # Límite de artículos a mantener en memoria
|
||||
|
||||
# Configuración para cache en Redis (solo necesario si type: "redis")
|
||||
redis:
|
||||
host: "localhost"
|
||||
port: 6379
|
||||
db: 0
|
||||
password: null # null o string con la contraseña
|
||||
|
||||
Reference in New Issue
Block a user