Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class Settings(BaseSettings):

# ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ๋ฒ„์ „
# deploy๋ธŒ๋žœ์น˜๋กœ ๋ณ‘ํ•ฉํ•  ๋•Œ
app_version: str = "1.2.4"
app_version: str = "1.2.5"

@property
def allowed_origins_list(self) -> list[str]:
Expand Down
22 changes: 17 additions & 5 deletions app/services/news/news_db_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,28 @@ async def save_column(self, column_data: Dict[str, Any]) -> bool:
"sections": sections
}, ensure_ascii=False)

# source_published_at์„ TIMESTAMP๋กœ ๋ณ€ํ™˜ (๋ฌธ์ž์—ด์ธ ๊ฒฝ์šฐ)
# source_published_at์„ ๋‚ ์งœ๋งŒ ์ถ”์ถœ (YYYY-MM-DD ํ˜•์‹)
published_at_timestamp = None
if source_published_at:
try:
# ISO ํ˜•์‹ ๋ฌธ์ž์—ด์„ ํŒŒ์‹ฑ
# ISO ํ˜•์‹ ๋ฌธ์ž์—ด์—์„œ ๋‚ ์งœ ๋ถ€๋ถ„๋งŒ ์ถ”์ถœ (YYYY-MM-DD)
if isinstance(source_published_at, str):
published_at_timestamp = datetime.fromisoformat(source_published_at.replace('Z', '+00:00'))
# "2025-11-14T19:16:24Z" -> "2025-11-14"
date_str = source_published_at.split('T')[0]
# ๋‚ ์งœ๋งŒ ํŒŒ์‹ฑํ•˜์—ฌ ์‹œ๊ฐ„์€ 00:00:00์œผ๋กœ ์„ค์ •
published_at_timestamp = datetime.strptime(date_str, '%Y-%m-%d')
else:
published_at_timestamp = source_published_at
except Exception:
# datetime ๊ฐ์ฒด์ธ ๊ฒฝ์šฐ ๋‚ ์งœ๋งŒ ์ถ”์ถœ
if isinstance(source_published_at, datetime):
published_at_timestamp = datetime(
source_published_at.year,
source_published_at.month,
source_published_at.day
)
else:
published_at_timestamp = None
except Exception as e:
logger.warning("source_published_at_parse_failed", error=str(e), value=source_published_at)
published_at_timestamp = None

# UPSERT ์ฟผ๋ฆฌ (INSERT ... ON CONFLICT DO UPDATE)
Expand Down
Loading