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

Method sync_to_ingestion_on_save

api/environments/models.py:731–741  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

729
730 @hook(AFTER_SAVE) # type: ignore[misc]
731 def sync_to_ingestion_on_save(self) -> None:
732 from experimentation.models import WarehouseConnection
733 from experimentation.tasks import write_environment_ingestion_key
734
735 if not WarehouseConnection.objects.filter(
736 environment_id=self.environment_id
737 ).exists():
738 return
739 write_environment_ingestion_key.delay(
740 kwargs={"environment_api_key_id": self.id},
741 )
742
743 @hook(AFTER_DELETE) # type: ignore[misc]
744 def remove_from_ingestion_on_delete(self) -> None:

Callers

nothing calls this directly

Calls 1

existsMethod · 0.80

Tested by

no test coverage detected