more migration

Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
This commit is contained in:
Marc 'risson' Schmitt
2025-03-28 17:43:17 +01:00
parent d6c4f97158
commit 1ed6cf7517
2 changed files with 3 additions and 3 deletions

View File

@ -159,7 +159,7 @@ class AuthenticatorDuoStageViewSet(UsedByMixin, ModelViewSet):
},
status=400,
)
result = duo_import_devices.delay(str(stage.pk)).get()
result = duo_import_devices.send(str(stage.pk)).get_result()
return Response(data=result, status=200 if result["error"] == "" else 400)

View File

@ -1,15 +1,15 @@
"""duo tasks"""
from dramatiq.actor import actor
from structlog.stdlib import get_logger
from authentik.core.models import User
from authentik.root.celery import CELERY_APP
from authentik.stages.authenticator_duo.models import AuthenticatorDuoStage, DuoDevice
LOGGER = get_logger()
@CELERY_APP.task()
@actor(store_results=True)
def duo_import_devices(stage_pk: str):
"""Import duo devices"""
created = 0