refactor(v2): isolate legacy provider stack and prune obsolete tests
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
from django.contrib import admin
|
||||
from django.conf import settings
|
||||
|
||||
from .models import ImportFile, ImportRun, IngestionError, IngestionRun
|
||||
|
||||
@ -91,15 +92,18 @@ class ImportFileAdmin(admin.ModelAdmin):
|
||||
)
|
||||
|
||||
|
||||
@admin.register(IngestionRun)
|
||||
class LegacyIngestionRunAdmin(admin.ModelAdmin):
|
||||
list_display = ("provider_namespace", "job_type", "status", "started_at", "finished_at")
|
||||
list_filter = ("provider_namespace", "job_type", "status")
|
||||
search_fields = ("provider_namespace", "error_summary")
|
||||
|
||||
|
||||
@admin.register(IngestionError)
|
||||
class LegacyIngestionErrorAdmin(admin.ModelAdmin):
|
||||
list_display = ("provider_namespace", "entity_type", "external_id", "severity", "occurred_at")
|
||||
list_filter = ("severity", "provider_namespace")
|
||||
search_fields = ("entity_type", "external_id", "message")
|
||||
|
||||
|
||||
if settings.LEGACY_PROVIDER_STACK_ENABLED:
|
||||
admin.site.register(IngestionRun, LegacyIngestionRunAdmin)
|
||||
admin.site.register(IngestionError, LegacyIngestionErrorAdmin)
|
||||
|
||||
@ -1,9 +1,14 @@
|
||||
from django.conf import settings
|
||||
|
||||
from .runs import finish_ingestion_run, log_ingestion_error, start_ingestion_run
|
||||
from .sync import run_sync_job
|
||||
|
||||
__all__ = [
|
||||
"start_ingestion_run",
|
||||
"finish_ingestion_run",
|
||||
"log_ingestion_error",
|
||||
"run_sync_job",
|
||||
]
|
||||
|
||||
if settings.LEGACY_PROVIDER_STACK_ENABLED:
|
||||
from .sync import run_sync_job # pragma: no cover - legacy provider stack only.
|
||||
|
||||
__all__.append("run_sync_job")
|
||||
|
||||
Reference in New Issue
Block a user