(identity_uuid: str)
| 92 | |
| 93 | @register_task_handler(priority=TaskPriority.HIGH) |
| 94 | def sync_identity_document_features(identity_uuid: str): # type: ignore[no-untyped-def] |
| 95 | from .models import EdgeIdentity |
| 96 | |
| 97 | identity = EdgeIdentity.from_identity_document( |
| 98 | EdgeIdentity.dynamo_wrapper.get_item_from_uuid(identity_uuid) |
| 99 | ) |
| 100 | |
| 101 | valid_feature_names = set( |
| 102 | FeatureState.objects.filter( |
| 103 | environment__api_key=identity.environment_api_key |
| 104 | ).values_list("feature__name", flat=True) |
| 105 | ) |
| 106 | |
| 107 | identity.synchronise_features(valid_feature_names) |
| 108 | identity.save() |
| 109 | |
| 110 | |
| 111 | @register_task_handler() |
searching dependent graphs…