Skip to content

Commit bafc92a

Browse files
committed
fix: correctly log in cronjob
1 parent c81344d commit bafc92a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

api.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ def daily_report():
4141
start_time = datetime.now().replace(hour=0, minute=0, second=0, microsecond=0).timestamp()
4242
end_time = datetime.now().replace(hour=23, minute=59, second=59, microsecond=0).timestamp()
4343

44+
# import translator once more due to separate cronjob process
45+
from biz.utils.i18n import get_translator
46+
_ = get_translator()
47+
4448
try:
4549
if PUSH_REVIEW_ENABLED:
4650
df = ReviewService().get_push_review_logs(updated_at_gte=start_time, updated_at_lte=end_time)

0 commit comments

Comments
 (0)