Starts in:
0 DAY
0 HR
17 MIN
56 SEC
Starts in:
0 D
0 H
17 M
56 S

Activities of "oleksandra.nakonechniuk"

Answer

this what method get features return and next time it will be 200

Answer

Question

Hello. I created FeatureDefinitionProvider in the domain layer. Is it ok? because I need to take some data from the database. Is it possible to do like this? And then I use the feature checker as You provide in the documentation. Can the name of the feature be with white space?

I am asking because when I created these features and load to prod, they were working correctly. But after several deploys, they fell. The method where I use the feature checker works every second time. I mean one time it returns a response next time it returns 500 HTTP error. And say that can't found feature the first in the list.
My using of feature checker :

public async Task<List<AssessmentTypeDto?>> GetMovementsTestFeatures() { var mvmTypes = await _asmTypeRepository.GetAssessmentTypes(AssessmentTypeNames.Movement); return await GetListAssessmentTypesWithCheckedFeatures(mvmTypes); }

private async Task&lt;List&lt;AssessmentTypeDto&gt;> GetListAssessmentTypesWithCheckedFeatures(List&lt;AssessmentType&gt; asmtypes)
{
    var results = _objectMapper.Map&lt;List&lt;AssessmentType&gt;, List&lt;AssessmentTypeDto&gt;>(asmtypes);
    var updatedResults = new List&lt;AssessmentTypeDto&gt;();

    foreach (var m in results)
    {
        var isEnableType = await _featureChecker.IsEnabledAsync(m.Code);

        if (isEnableType)
        {
            var movements = new List&lt;AssessmentMovementDto&gt;();

            foreach (var x in m.Movements)
            {
                var isEnabled = await _featureChecker.IsEnabledAsync(x.Code);

                if (isEnabled)
                {
                    movements.Add(x);
                }
            }

            m.Movements = movements.OrderBy(x => x.DisplayOrder).ToList();
        }
        else
        {
            m.Movements = new List&lt;AssessmentMovementDto&gt;();
        }

        if (isEnableType)
        {
            updatedResults.Add(m);
        }
    }

    return updatedResults;
}
Showing 11 to 13 of 13 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06