시간값 수정 .
This commit is contained in:
1 parent
2a25640535
commit
faeb05537c
3 files changed
+13
-6
No files matched your search
+2
-3
@@ -8,12 +8,11 @@ scheduled_at이 현재 시간 이전이고 status가 pending인 업로드 작업
|
||||
import asyncio
|
||||
import logging
|
||||
from datetime import datetime
|
||||
from zoneinfo import ZoneInfo
|
||||
|
||||
import httpx
|
||||
from sqlalchemy import text
|
||||
|
||||
from config import settings
|
||||
from config import settings, TIMEZONE
|
||||
from db import SessionLocal
|
||||
from jobs.base import BaseJob
|
||||
|
||||
@@ -47,7 +46,7 @@ class SnsUploadJob(BaseJob):
|
||||
|
||||
async def _fetch_pending_uploads(self) -> list[int]:
|
||||
# DB의 다른 datetime 컬럼과 동일하게 Seoul time naive로 비교
|
||||
now = datetime.now(ZoneInfo("Asia/Seoul")).replace(tzinfo=None).strftime("%Y-%m-%d %H:%M:%S")
|
||||
now = datetime.now(TIMEZONE).replace(tzinfo=None).strftime("%Y-%m-%d %H:%M:%S")
|
||||
query = text("""
|
||||
SELECT id FROM social_upload
|
||||
WHERE status = 'pending'
|
||||
|
||||
Reference in new issue
Block a user