From d40c56804ef2ffd92fe2d81750ba5a0fa404b658 Mon Sep 17 00:00:00 2001 From: Olivier Leger Date: Wed, 18 Dec 2024 16:21:51 -0500 Subject: [PATCH] Apply requested changes --- kobo/apps/long_running_migrations/models.py | 2 +- kobo/apps/long_running_migrations/tasks.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kobo/apps/long_running_migrations/models.py b/kobo/apps/long_running_migrations/models.py index 2b4e3f29d5..d6e4ef3e08 100644 --- a/kobo/apps/long_running_migrations/models.py +++ b/kobo/apps/long_running_migrations/models.py @@ -21,7 +21,7 @@ class LongRunningMigration(AbstractTimeStampedModel): LONG_RUNNING_MIGRATIONS_DIR = os.path.join( 'kobo', 'apps', - 'long_running_migrations' + 'jobs' ) name = models.CharField(max_length=255, unique=True) diff --git a/kobo/apps/long_running_migrations/tasks.py b/kobo/apps/long_running_migrations/tasks.py index 376603cde4..0b2510c80c 100644 --- a/kobo/apps/long_running_migrations/tasks.py +++ b/kobo/apps/long_running_migrations/tasks.py @@ -35,7 +35,7 @@ def execute_long_running_migrations(): Q(status=LongRunningMigrationStatus.CREATED) | Q(status=LongRunningMigrationStatus.IN_PROGRESS) & Q(date_modified__lte=task_expiry_time) - ): + ).order_by('date_created'): migration.execute() finally: cache.delete(lock_key)