From fc4d6200151143f46ce1d0e6166c5442acf5ea18 Mon Sep 17 00:00:00 2001 From: Thorsten Zoerner Date: Mon, 5 Feb 2024 14:09:53 +0100 Subject: [PATCH] Fix: Allow to preload standard (core) microservices or specify custom services of node via env `EAF_SERVICES` --- framework/CHANGELOG.md | 8 ++++++++ framework/index.js | 7 ++++++- framework/package-lock.json | 4 ++-- framework/package.json | 2 +- 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index 176c71c..16a39ed 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -1,3 +1,11 @@ +## [0.6.6](https://github.com/energychain/ZSG_DynamischeStromtarife/compare/v0.6.5...v0.6.6) (2024-02-05) + + +### Bug Fixes + +* Balance profile chart has "direct" in front now. ([81d1000](https://github.com/energychain/ZSG_DynamischeStromtarife/commit/81d10007aba26bf6b5dbcd84a422b51e613ed093)) +* Specify main in package.json to allow embedded usage of EAF. ([4c6b848](https://github.com/energychain/ZSG_DynamischeStromtarife/commit/4c6b848fb2e8a494b70661e618e5b9686006a034)) + ## [0.6.5](https://github.com/energychain/ZSG_DynamischeStromtarife/compare/v0.6.4...v0.6.5) (2024-02-04) ### Increment Balancing Enhancement: Implemented a balancing enhancement that allows for linear optimization of individual balances to optimize inner dispatches of generation and consumption in a period. This is achieved by feeding multiple balances in sequence into a simplex optimization. diff --git a/framework/index.js b/framework/index.js index 518165e..38e213f 100644 --- a/framework/index.js +++ b/framework/index.js @@ -1,7 +1,7 @@ module.exports = { node: function() { var os = require("os"); - + if(typeof process.env["EAF_NODE_ID"] == 'undefined') { process.env["EAF_NODE_ID"] = 'node_'+os.hostname(); } @@ -9,6 +9,11 @@ module.exports = { let runnerArgs = []; runnerArgs.push(process.argv[0]); runnerArgs.push(process.argv[1]); + if(typeof process.env["EAF_SERVICES"] !== 'undefined') { + runnerArgs.push(process.env["EAF_SERVICES"]); + } else { + runnerArgs.push(__dirname + "/services/**/*.service.js"); + } const runner = new Runner(); runner.start(runnerArgs); diff --git a/framework/package-lock.json b/framework/package-lock.json index bfdfb03..061d059 100644 --- a/framework/package-lock.json +++ b/framework/package-lock.json @@ -1,12 +1,12 @@ { "name": "stromdao-eaf", - "version": "0.6.5", + "version": "0.6.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "stromdao-eaf", - "version": "0.6.5", + "version": "0.6.6", "license": "Apache-2.0", "dependencies": { "@moleculer/lab": "^0.6.4", diff --git a/framework/package.json b/framework/package.json index fadc7f3..67db3ee 100644 --- a/framework/package.json +++ b/framework/package.json @@ -1,6 +1,6 @@ { "name": "stromdao-eaf", - "version": "0.6.5", + "version": "0.6.6", "description": "STROMDAO Energy Application Framework - Referenzimplementierung für dynamische Stromtarife", "scripts": { "dev": "node ./run-eaf",