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

Method process_environment_update

api/audit/models.py:147–168  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

145 is_now=True,
146 )
147 def process_environment_update(self) -> None:
148 if not self.project:
149 return
150
151 from environments.models import Environment
152 from environments.tasks import process_environment_update
153
154 environments_filter = Q()
155 if self.environment_id:
156 environments_filter = Q(id=self.environment_id)
157
158 environment_ids = self.project.environments.filter(
159 environments_filter
160 ).values_list("id", flat=True)
161
162 # Update environment individually to avoid deadlock
163 for environment_id in environment_ids:
164 Environment.objects.filter(id=environment_id).update(
165 updated_at=self.created_date
166 )
167
168 process_environment_update.delay(args=(self.id,))

Callers

nothing calls this directly

Calls 1

updateMethod · 0.45

Tested by

no test coverage detected