diff --git a/backend/api/migrations/0029_alter_job_name.py b/backend/api/migrations/0029_alter_job_name.py new file mode 100644 index 0000000..8cb8538 --- /dev/null +++ b/backend/api/migrations/0029_alter_job_name.py @@ -0,0 +1,18 @@ +# Generated by Django 6.0.2 on 2026-02-19 17:22 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('api', '0028_job_systemconfig'), + ] + + operations = [ + migrations.AlterField( + model_name='job', + name='name', + field=models.CharField(choices=[('sync_flavors', 'Sync Holy Flavors'), ('cleanup_duplicates', 'Cleanup Duplicate Flavors'), ('backup_db', 'Database Backup'), ('seed_legacy', 'Seed Legacy Data')], max_length=100), + ), + ] diff --git a/backend/api/models.py b/backend/api/models.py index 1c61c37..0a86957 100644 --- a/backend/api/models.py +++ b/backend/api/models.py @@ -241,7 +241,7 @@ class SystemConfig(models.Model): class Job(models.Model): """Tracks background jobs, their status and scheduling.""" JOB_TYPES = [ - ('sync_flavors', 'Sync Shopify Flavors'), + ('sync_flavors', 'Sync Holy Flavors'), ('cleanup_duplicates', 'Cleanup Duplicate Flavors'), ('backup_db', 'Database Backup'), ('seed_legacy', 'Seed Legacy Data'), diff --git a/backend/api/views.py b/backend/api/views.py index b523b06..24f1e11 100644 --- a/backend/api/views.py +++ b/backend/api/views.py @@ -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() diff --git a/docker-compose.yml b/docker-compose.yml index 6250a53..de97f3a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -14,6 +14,9 @@ services: - ./legacy:/app/legacy environment: - PYTHONUNBUFFERED=1 + dns: + - 8.8.8.8 + - 1.1.1.1 labels: - "traefik.enable=true" - "traefik.docker.network=narl" @@ -38,6 +41,9 @@ services: restart: unless-stopped networks: - internal + dns: + - 8.8.8.8 + - 1.1.1.1 env_file: - .env volumes: