Ejemplo n.º 1
0
        //
        // Calculate
        //
        public async Task <SmFunctionGroupSummary> CalculateStart(int scenarioId, int instanceTotal, int instanceNumber)
        {
            var model = new FunctionInstanceCalculateJson(_cloudWatchSettings);

            var result = await _functionRepository.Update(scenarioId, FunctionType.Markdown, FunctionGroupType.Calculate,
                                                          _cloudWatchSettings.FunctionVersion, instanceTotal, FunctionInstanceType.CalculateStarting, instanceNumber,
                                                          model);

            return(SmFunctionGroupSummary.Build(result));
        }
Ejemplo n.º 2
0
        public async Task <SmFunctionGroupSummary> CalculateUpdate(int scenarioId, int instanceTotal, int instanceNumber, long productTotal, long productCount, double productRate, long recommendationCount, int hierarchyErrorCount)
        {
            var model = new FunctionInstanceCalculateJson(_cloudWatchSettings)
            {
                ProductTotal        = productTotal,
                ProductCount        = productCount,
                ProductRate         = productRate,
                RecommendationCount = recommendationCount,
                HierarchyErrorCount = hierarchyErrorCount
            };

            var result = await _functionRepository.Update(scenarioId, FunctionType.Markdown, FunctionGroupType.Calculate,
                                                          _cloudWatchSettings.FunctionVersion, instanceTotal, FunctionInstanceType.CalculateRunning, instanceNumber,
                                                          model);

            return(SmFunctionGroupSummary.Build(result));
        }