refactor(api): change async functions to synchronous for user verification task 🔨
All checks were successful
Build and Push Docker Images / Build and Push Docker Images (push) Successful in 6m8s

This commit is contained in:
2025-07-08 22:57:43 +05:00
parent 8657435fbf
commit 35384ef049
2 changed files with 3 additions and 4 deletions

View File

@ -29,9 +29,9 @@ def assign_device_permissions(sender, instance, created, **kwargs):
@receiver(post_save, sender=User)
async def verify_user_with_person_api(sender, instance, created, **kwargs):
def verify_user_with_person_api(sender, instance, created, **kwargs):
if created:
await verify_user_with_person_api_task.defer_async(instance.id)
verify_user_with_person_api_task(instance.id)
@receiver(reset_password_token_created)

View File

@ -69,8 +69,7 @@ def add_new_devices_to_omada(new_devices: list[dict]):
omada_client.add_new_devices_to_omada(new_devices)
@app.task
async def verify_user_with_person_api_task(user_id: int):
def verify_user_with_person_api_task(user_id: int):
"""
Verify the user with the Person API.
:param user_id: The ID of the user to verify.