MCPcopy Create free account
hub / github.com/Flagsmith/flagsmith / sync_identity_document_features

Function sync_identity_document_features

api/edge_api/identities/tasks.py:94–108  ·  view source on GitHub ↗
(identity_uuid: str)

Source from the content-addressed store, hash-verified

92
93@register_task_handler(priority=TaskPriority.HIGH)
94def 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()

Calls 5

get_item_from_uuidMethod · 0.80
synchronise_featuresMethod · 0.80
setFunction · 0.50
saveMethod · 0.45

Used in the wild real call sites across dependent graphs

searching dependent graphs…