feat: limit source exports to current year

This commit is contained in:
2026-08-04 23:25:26 +02:00
parent eaf8a18f8b
commit ef92cc4610
7 changed files with 308 additions and 25 deletions

View File

@@ -146,6 +146,7 @@ class SourceRecordExportArtifactsTaskTest(TestCase):
self.assertEqual(result["status"], "success")
self.assertEqual(result["artifacts_count"], 25)
self.assertEqual(result["export_year"], timezone.localdate().year)
self.assertIsNone(cache.get(settings.SOURCE_RECORD_EXPORT_LOCK_KEY))
def test_refresh_task_skips_when_another_generation_holds_lock(self):