Skip to content

Commit 0484cd1

Browse files
committed
hotfix: 주간 메일링 배치 시간대 이슈 체크
1 parent bfda4e1 commit 0484cd1

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

.github/workflows/run-weekly-analysis.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ name: Weekly Analysis Batch
33
on:
44
workflow_dispatch:
55
schedule:
6-
# 매주 월요일 오전 9시 30분(KST, UTC+9) 실행 -> UTC 기준 00:30 월요일
7-
- cron: "30 0 * * 1"
6+
# 매주 월요일 오전 7시(KST, UTC+9) 실행 -> UTC 기준 일요일 22:00
7+
- cron: "0 22 * * 0"
88

99
jobs:
1010
weekly-trend-analysis-batch:

.github/workflows/run-weekly-newsletter.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ name: Weekly Newsletter Batch
33
on:
44
workflow_dispatch:
55
schedule:
6-
# 매주 월요일 오전 7시(KST, UTC+9) 실행 -> UTC 기준 일요일 22:00
7-
- cron: "0 22 * * 0"
6+
# 매주 월요일 오전 9시 30분(KST, UTC+9) 실행 -> UTC 기준 00:30 월요일
7+
- cron: "30 0 * * 1"
88

99
jobs:
1010
weekly-newsletter-batch:

insight/admin/base_admin.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from django.contrib import admin
55
from django.db.models import QuerySet
66
from django.http import HttpRequest
7+
from django.utils import timezone
78
from django.utils.html import format_html
89
from django.utils.safestring import mark_safe
910

@@ -37,8 +38,11 @@ def is_processed_colored(self, obj: WeeklyTrend | UserWeeklyTrend):
3738
@admin.display(description="처리 완료 시간")
3839
def processed_at_formatted(self, obj: WeeklyTrend | UserWeeklyTrend):
3940
"""처리 완료 시간 포맷팅"""
41+
4042
if obj.processed_at:
41-
return obj.processed_at.strftime("%Y-%m-%d %H:%M")
43+
return timezone.localtime(obj.processed_at).strftime(
44+
"%Y-%m-%d %H:%M:%S"
45+
)
4246
return "-"
4347

4448
@admin.display(description="Insight JSON")

0 commit comments

Comments
 (0)