feat: Implement automated keyword-based news pipeline scheduler
- Add multi-threaded keyword scheduler for periodic news collection - Create Keyword Manager API for CRUD operations and monitoring - Implement automatic pipeline triggering (RSS → Google → AI → Translation) - Add thread status monitoring and dynamic keyword management - Support priority-based execution and configurable intervals - Add comprehensive scheduler documentation guide - Default keywords: AI, 테크놀로지, 경제, 블록체인 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@ -481,7 +481,7 @@ services:
|
||||
restart: unless-stopped
|
||||
|
||||
# ============ Pipeline Services ============
|
||||
# Pipeline Scheduler Service
|
||||
# Pipeline Multi-threaded Scheduler Service
|
||||
pipeline-scheduler:
|
||||
build:
|
||||
context: ./services/pipeline
|
||||
@ -494,8 +494,30 @@ services:
|
||||
environment:
|
||||
- REDIS_URL=redis://redis:6379
|
||||
- MONGODB_URL=mongodb://mongodb:27017
|
||||
- DB_NAME=pipeline_db
|
||||
- DB_NAME=ai_writer_db
|
||||
- LOG_LEVEL=INFO
|
||||
command: python multi_thread_scheduler.py
|
||||
volumes:
|
||||
- ./services/pipeline/shared:/app/shared:ro
|
||||
networks:
|
||||
- site11_network
|
||||
|
||||
# Keyword Manager API Service
|
||||
keyword-manager:
|
||||
build:
|
||||
context: ./services/pipeline
|
||||
dockerfile: scheduler/Dockerfile
|
||||
container_name: ${COMPOSE_PROJECT_NAME}_keyword_manager
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- mongodb
|
||||
environment:
|
||||
- MONGODB_URL=mongodb://mongodb:27017
|
||||
- DB_NAME=ai_writer_db
|
||||
- API_PORT=8100
|
||||
command: python keyword_manager.py
|
||||
ports:
|
||||
- "8100:8100"
|
||||
volumes:
|
||||
- ./services/pipeline/shared:/app/shared:ro
|
||||
networks:
|
||||
@ -513,6 +535,7 @@ services:
|
||||
environment:
|
||||
- REDIS_URL=redis://redis:6379
|
||||
- LOG_LEVEL=INFO
|
||||
- RSS_ENQUEUE_DELAY=1.0
|
||||
volumes:
|
||||
- ./services/pipeline/shared:/app/shared:ro
|
||||
networks:
|
||||
@ -523,7 +546,6 @@ services:
|
||||
build:
|
||||
context: ./services/pipeline
|
||||
dockerfile: google-search/Dockerfile
|
||||
container_name: ${COMPOSE_PROJECT_NAME}_pipeline_google_search
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- redis
|
||||
@ -537,30 +559,11 @@ services:
|
||||
networks:
|
||||
- site11_network
|
||||
|
||||
# Pipeline AI Summarizer Worker
|
||||
pipeline-ai-summarizer:
|
||||
# Pipeline AI Article Generator Worker
|
||||
pipeline-ai-article-generator:
|
||||
build:
|
||||
context: ./services/pipeline
|
||||
dockerfile: ai-summarizer/Dockerfile
|
||||
container_name: ${COMPOSE_PROJECT_NAME}_pipeline_ai_summarizer
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- redis
|
||||
environment:
|
||||
- REDIS_URL=redis://redis:6379
|
||||
- CLAUDE_API_KEY=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
|
||||
- LOG_LEVEL=INFO
|
||||
volumes:
|
||||
- ./services/pipeline/shared:/app/shared:ro
|
||||
networks:
|
||||
- site11_network
|
||||
|
||||
# Pipeline Article Assembly Worker
|
||||
pipeline-article-assembly:
|
||||
build:
|
||||
context: ./services/pipeline
|
||||
dockerfile: article-assembly/Dockerfile
|
||||
container_name: ${COMPOSE_PROJECT_NAME}_pipeline_article_assembly
|
||||
dockerfile: ai-article-generator/Dockerfile
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- redis
|
||||
@ -568,7 +571,7 @@ services:
|
||||
environment:
|
||||
- REDIS_URL=redis://redis:6379
|
||||
- MONGODB_URL=mongodb://mongodb:27017
|
||||
- DB_NAME=pipeline_db
|
||||
- DB_NAME=ai_writer_db
|
||||
- CLAUDE_API_KEY=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
|
||||
- LOG_LEVEL=INFO
|
||||
volumes:
|
||||
@ -576,6 +579,7 @@ services:
|
||||
networks:
|
||||
- site11_network
|
||||
|
||||
|
||||
# Pipeline Monitor (optional dashboard)
|
||||
pipeline-monitor:
|
||||
build:
|
||||
@ -591,7 +595,7 @@ services:
|
||||
environment:
|
||||
- REDIS_URL=redis://redis:6379
|
||||
- MONGODB_URL=mongodb://mongodb:27017
|
||||
- DB_NAME=pipeline_db
|
||||
- DB_NAME=ai_writer_db
|
||||
- LOG_LEVEL=INFO
|
||||
volumes:
|
||||
- ./services/pipeline/shared:/app/shared:ro
|
||||
@ -603,12 +607,14 @@ services:
|
||||
build:
|
||||
context: ./services/pipeline
|
||||
dockerfile: translator/Dockerfile
|
||||
container_name: ${COMPOSE_PROJECT_NAME}_pipeline_translator
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- redis
|
||||
- mongodb
|
||||
environment:
|
||||
- REDIS_URL=redis://redis:6379
|
||||
- MONGODB_URL=mongodb://mongodb:27017
|
||||
- DB_NAME=ai_writer_db
|
||||
- DEEPL_API_KEY=3abbc796-2515-44a8-972d-22dcf27ab54a
|
||||
- LOG_LEVEL=INFO
|
||||
volumes:
|
||||
@ -616,6 +622,27 @@ services:
|
||||
networks:
|
||||
- site11_network
|
||||
|
||||
# Pipeline Language Sync Service
|
||||
pipeline-language-sync:
|
||||
build:
|
||||
context: ./services/pipeline
|
||||
dockerfile: translator/Dockerfile
|
||||
container_name: ${COMPOSE_PROJECT_NAME}_pipeline_language_sync
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- mongodb
|
||||
environment:
|
||||
- MONGODB_URL=mongodb://mongodb:27017
|
||||
- DB_NAME=ai_writer_db
|
||||
- DEEPL_API_KEY=3abbc796-2515-44a8-972d-22dcf27ab54a
|
||||
- LOG_LEVEL=INFO
|
||||
command: ["python", "language_sync.py"]
|
||||
volumes:
|
||||
- ./services/pipeline/shared:/app/shared:ro
|
||||
- ./services/pipeline/config:/app/config:ro
|
||||
networks:
|
||||
- site11_network
|
||||
|
||||
# Pipeline Image Generator
|
||||
pipeline-image-generator:
|
||||
build:
|
||||
@ -625,15 +652,20 @@ services:
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- redis
|
||||
- mongodb
|
||||
env_file:
|
||||
- ./services/pipeline/.env
|
||||
environment:
|
||||
- REDIS_URL=redis://redis:6379
|
||||
- REPLICATE_API_KEY=${REPLICATE_API_KEY:-}
|
||||
- MONGODB_URL=mongodb://mongodb:27017
|
||||
- DB_NAME=ai_writer_db
|
||||
- LOG_LEVEL=INFO
|
||||
volumes:
|
||||
- ./services/pipeline/shared:/app/shared:ro
|
||||
networks:
|
||||
- site11_network
|
||||
|
||||
|
||||
networks:
|
||||
site11_network:
|
||||
driver: bridge
|
||||
|
||||
Reference in New Issue
Block a user