Skip to content

Commit

Permalink
Fix: Allow to preload standard (core) microservices or specify custom…
Browse files Browse the repository at this point in the history
… services of node via env `EAF_SERVICES`
  • Loading branch information
zoernert committed Feb 5, 2024
1 parent 4c6b848 commit fc4d620
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
8 changes: 8 additions & 0 deletions framework/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
7 changes: 6 additions & 1 deletion framework/index.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
module.exports = {
node: function() {
var os = require("os");

if(typeof process.env["EAF_NODE_ID"] == 'undefined') {
process.env["EAF_NODE_ID"] = 'node_'+os.hostname();
}
const { Runner } = require("moleculer");
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);

Expand Down
4 changes: 2 additions & 2 deletions framework/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion framework/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit fc4d620

Please sign in to comment.