Merge commit '46171b4f24f2ddc3b9212b9ad6769925bcaceb03' into feature/site-features-and-mockup
# Conflicts: # .env.example # solution/backend/common/enums.py # solution/backend/requirements.txt # solution/backend/services/site_payload.py # solution/backend/services/snapshot.py # solution/backend/services/weather_notes.json # solution/shared/src/types/site-payload.ts # solution/site/src/layouts/editorial/Shell.tsx # solution/site/src/lib/use-live-weather.ts # solution/site/src/pages/HomePage.tsx # solution/site/src/sections/SiteFooter.tsx # solution/site/src/sections/WeatherSection.tsx # solution/site/src/sections/index.ts
This commit is contained in:
commit
b78486b845
74 files changed
+3266
-193
No files matched your search
@@ -2,6 +2,10 @@
|
||||
|
||||
다중 워커(운영)에서 잡이 워커마다 중복 실행되면 안 되므로 SCHEDULER_ENABLED=1 인 프로세스에서만 등록한다.
|
||||
|
||||
등록된 잡 —
|
||||
· SNS 승인 만료·중단 복구 : 5분 간격 (scheduler/jobs.sweep_social_posts)
|
||||
|
||||
붙을 잡 —
|
||||
등록된 잡:
|
||||
· Search Console (GSC_ENABLED=1, 10분마다)
|
||||
· 알림 발송 스윕 (1분마다) — alert_outbox 의 PENDING 을 실제로 보낸다
|
||||
@@ -39,6 +43,12 @@ def start_scheduler():
|
||||
|
||||
# 한국시간 기준. 잡은 scheduler/jobs.py 에 정의하고 여기서 add_job 으로 등록한다.
|
||||
_scheduler = AsyncIOScheduler(timezone="Asia/Seoul")
|
||||
# ★ 1분이 아니라 5분이다. 이 스윕이 하는 일은 "만료 표시" 와 "중단된 초안 정리" 뿐이라
|
||||
# 분 단위 정밀도가 필요 없고, 주기가 짧으면 쓰기 커넥션을 계속 집어 든다 —
|
||||
# 실측(2026-09-14): 1분 주기로 두자 같은 컨테이너에서 도는 테스트가 커넥션을 못 받아
|
||||
# TimeoutError 로 무더기 실패했다. 운영에서도 같은 풀을 발행·수집과 나눠 쓴다.
|
||||
from scheduler.jobs import sweep_social_posts
|
||||
_scheduler.add_job(sweep_social_posts, 'interval', minutes=5, max_instances=1, coalesce=True)
|
||||
if os.environ.get("GSC_ENABLED") == "1":
|
||||
from services.search_console_service import run_scheduled_check
|
||||
_scheduler.add_job(run_scheduled_check, "interval", minutes=10,
|
||||
@@ -56,6 +66,7 @@ def start_scheduler():
|
||||
_scheduler.add_job(sweep_blog_mail, "cron", hour=9, minute=0,
|
||||
id="blog-mail", max_instances=1, coalesce=True)
|
||||
_scheduler.start()
|
||||
LOG.i("[scheduler] started (KST: SNS 승인 만료·중단 복구)")
|
||||
LOG.i(f"[scheduler] started (KST: {len(_scheduler.get_jobs())}개 잡)")
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user