Skip to content

Commit f4259da

Browse files
Merge pull request #1066 from Green-Software-Foundation/fix-multiple-aggregatino
Fix multiple aggregation
2 parents 7011a2c + 4b9d14e commit f4259da

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/if-run/lib/compute.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,6 @@ const computeNode = async (node: Node, params: ComputeParams): Promise<any> => {
184184
debugLogger.setExecutingPluginName(pluginName);
185185

186186
outputStorage = await plugin.execute(outputStorage, nodeConfig);
187-
console.log(outputStorage);
188187
debugLogger.setExecutingPluginName();
189188

190189
node.outputs = outputStorage;

src/if-run/lib/initialize.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import * as path from 'node:path';
33
import {ERRORS} from '@grnsft/if-core/utils';
44
import {PluginInterface} from '@grnsft/if-core/types';
55

6+
import {storeAggregationMetrics} from './aggregate';
7+
68
import {logger} from '../../common/util/logger';
79
import {memoizedLog} from '../util/log-memoize';
810
import {pluginStorage} from '../util/plugin-storage';
@@ -11,7 +13,6 @@ import {CONFIG, STRINGS} from '../config';
1113

1214
import {Context, PluginOptions} from '../../common/types/manifest';
1315
import {PluginStorageInterface} from '../types/plugin-storage';
14-
import {storeAggregationMetrics} from './aggregate';
1516

1617
const {
1718
PluginInitializationError,

src/if-run/util/aggregation-helper.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ export const aggregateOutputsIntoOne = (
3939
const aggregationType = isTemporal ? 'component' : 'time';
4040

4141
if (aggregationParams[aggregationType] === 'none') {
42-
return acc;
42+
continue;
4343
}
4444

4545
if (aggregationParams[aggregationType] === 'copy') {
4646
acc[metric] = output[metric];
47-
return acc;
47+
continue;
4848
}
4949

5050
acc[metric] = acc[metric] ?? 0;

0 commit comments

Comments
 (0)