(
**kwargs: Unpack[TrackFeatureEvaluationsByEnvironmentKwargs],
)
| 96 | |
| 97 | @register_task_handler() |
| 98 | def track_feature_evaluations_by_environment( |
| 99 | **kwargs: Unpack[TrackFeatureEvaluationsByEnvironmentKwargs], |
| 100 | ) -> None: |
| 101 | environment_id = kwargs["environment_id"] |
| 102 | feature_evaluations = kwargs["feature_evaluations"] |
| 103 | if settings.USE_POSTGRES_FOR_ANALYTICS: |
| 104 | FeatureEvaluationRaw.objects.bulk_create( |
| 105 | map_feature_evaluation_data_to_feature_evaluation_raw( |
| 106 | environment_id=environment_id, |
| 107 | feature_evaluations=feature_evaluations, |
| 108 | ) |
| 109 | ) |
| 110 | elif settings.INFLUXDB_TOKEN: |
| 111 | track_feature_evaluation_influxdb( |
| 112 | environment_id=environment_id, |
| 113 | feature_evaluations=feature_evaluations, |
| 114 | ) |
| 115 | |
| 116 | |
| 117 | @register_task_handler() |
searching dependent graphs…