fixed container dns resolution, improved scheduling timezone logic, and renamed sync job

This commit is contained in:
nvrl committed 2026-02-19 18:23:11 +01:00
1 parent 31144e4704
commit 2da6c8e240
4 files changed
+33 -2

No files matched your search

+8 -1
View File
@@ -919,7 +919,14 @@ class AdminViewSet(viewsets.ViewSet):
if next_run is not None:
from django.utils.dateparse import parse_datetime
job.next_run = parse_datetime(next_run)
from django.utils import timezone
parsed_dt = parse_datetime(next_run)
if parsed_dt:
# If it's naive (has no timezone info), assume it's local time
if timezone.is_naive(parsed_dt):
job.next_run = timezone.make_aware(parsed_dt, timezone.get_current_timezone())
else:
job.next_run = parsed_dt
elif interval is not None and job.interval_hours > 0 and not job.next_run:
from django.utils import timezone
job.next_run = timezone.now()