In "Set Filename" wird eine Umgebungsvariable eine Umgebungsvariable verwendet

This commit is contained in:
huesser committed 2026-06-23 12:37:31 +02:00
1 parent d0730901d2
commit ae5af28782
5 files changed
+147 -30

No files matched your search

+3 -2
View File
@@ -21,7 +21,7 @@
- [ ] Fehlerhandling
- [x] Zeit wird falsch angegeben (Zeit fuer Filenamen mit $now)
- [x] Aktuell Fehler beim berechnen der Zeit fuer das File
- [ ] In "Set Filename" wird soll eine Umgebungsvariable verwendet werden
- [x] In "Set Filename" wird soll eine Umgebungsvariable verwendet werden
## 🐳 Docker & Deployment
- [ ] Docker-Volumes für Produktion prüfen
@@ -35,4 +35,5 @@
- [ ] Ausfuehrliche Dokumentation fuer Kollegen
## 🙋‍♂️Abstimmung mit Benutzern
- [ ] Mit Markus
- [ ] Mit Markus
+1
View File
@@ -11,6 +11,7 @@ services:
- GROUPINFO_JSON_LNK_NAME_WITH_PATH=/data/archivegroup_information.json
- NON_SPECIFIED_GROUPS=/data/non_specified_groups.csv
- BEGIN_NAME_GROUPINFO_JSON_FILE=size_by_ownergroup_and_number_of_copies_
- BEGIN_NAME_GROUPINFO_JSON_FILE_WITH_PATH=/data/size_by_ownergroup_and_number_of_copies_
- ERROR_LOGFILE=error.log
- JSON_CACHE=json_cache.json
- JSON_CACHE_WITH_PATH=/data/json_cache.json
@@ -1 +1 @@
size_by_ownergroup_and_number_of_copies_2026-06-23T09_52_12.json
size_by_ownergroup_and_number_of_copies_2026-06-23T11_26_07.json
+141 -26
View File
@@ -49,7 +49,7 @@
"topic": "",
"payload": "",
"payloadType": "date",
"x": 120,
"x": 180,
"y": 260,
"wires": [
[
@@ -104,7 +104,7 @@
"from": "",
"to": "",
"reg": false,
"x": 380,
"x": 440,
"y": 260,
"wires": [
[
@@ -128,7 +128,7 @@
"authType": "",
"senderr": false,
"headers": [],
"x": 670,
"x": 730,
"y": 260,
"wires": [
[
@@ -149,7 +149,7 @@
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 250,
"x": 310,
"y": 600,
"wires": []
},
@@ -161,7 +161,7 @@
"property": "payload",
"action": "",
"pretty": false,
"x": 190,
"x": 250,
"y": 360,
"wires": [
[
@@ -173,20 +173,17 @@
"id": "cc064f55fd438347",
"type": "file",
"z": "5a9dd923b7459820",
"name": "Write json to disk",
"name": "Write json to disk old",
"filename": "filename",
"filenameType": "msg",
"appendNewline": true,
"createDir": false,
"overwriteFile": "true",
"encoding": "none",
"x": 130,
"y": 500,
"x": 900,
"y": 1000,
"wires": [
[
"metabase_output_debug",
"63ed8c262fa7753b"
]
[]
]
},
{
@@ -199,7 +196,7 @@
"t": "set",
"p": "filename",
"pt": "msg",
"to": "\"/data/size_by_ownergroup_and_number_of_copies_\" & msg.date_string & \".json\"",
"to": "$env(\"BEGIN_NAME_GROUPINFO_JSON_FILE_WITH_PATH\") & msg.date_string & \".json\"",
"tot": "jsonata"
}
],
@@ -208,12 +205,12 @@
"from": "",
"to": "",
"reg": false,
"x": 750,
"x": 810,
"y": 360,
"wires": [
[
"cc064f55fd438347",
"7e0c38cadf8c5ebe"
"7e0c38cadf8c5ebe",
"737f4bb0df2e799c"
]
]
},
@@ -239,7 +236,7 @@
"winHide": false,
"oldrc": false,
"name": "create link to newest archivegroup information json",
"x": 550,
"x": 610,
"y": 500,
"wires": [
[
@@ -267,7 +264,7 @@
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1020,
"x": 1080,
"y": 500,
"wires": []
},
@@ -282,7 +279,7 @@
"createDir": false,
"overwriteFile": "false",
"encoding": "none",
"x": 680,
"x": 740,
"y": 660,
"wires": [
[
@@ -309,7 +306,7 @@
"from": "",
"to": "",
"reg": false,
"x": 460,
"x": 520,
"y": 660,
"wires": [
[
@@ -330,7 +327,7 @@
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 930,
"x": 990,
"y": 660,
"wires": []
},
@@ -340,7 +337,7 @@
"z": "5a9dd923b7459820",
"name": "link in Get New Groupinformation",
"links": [],
"x": 125,
"x": 185,
"y": 180,
"wires": [
[
@@ -355,7 +352,7 @@
"name": "link out Get New Groupinformation",
"mode": "return",
"links": [],
"x": 915,
"x": 975,
"y": 420,
"wires": []
},
@@ -415,7 +412,7 @@
"output": "date_string",
"outputType": "msg",
"outTz": "Europe/Zurich",
"x": 510,
"x": 570,
"y": 360,
"wires": [
[
@@ -432,14 +429,132 @@
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 1000,
"y": 260,
"wires": []
},
{
"id": "4c790912771b89dc",
"type": "moment",
"z": "5a9dd923b7459820",
"name": "Prepare date format for filename",
"topic": "",
"input": "start_time",
"inputType": "msg",
"inTz": "Europe/Zurich",
"adjAmount": 0,
"adjType": "days",
"adjDir": "add",
"format": "YYYY-MM-DD[T]HH_mm_ss",
"locale": "en-US",
"output": "date_string",
"outputType": "msg",
"outTz": "Europe/Zurich",
"x": 430,
"y": 880,
"wires": [
[
"c55ac9de5736d58c"
]
]
},
{
"id": "c55ac9de5736d58c",
"type": "change",
"z": "5a9dd923b7459820",
"name": "Set Filename",
"rules": [
{
"t": "set",
"p": "filename",
"pt": "msg",
"to": "$env(\"BEGIN_NAME_GROUPINFO_JSON_FILE\") & msg.date_string & \".json\"",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 710,
"y": 880,
"wires": [
[
"5ede70b6fab13b03"
]
]
},
{
"id": "3061839cda32600d",
"type": "inject",
"z": "5a9dd923b7459820",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 180,
"y": 880,
"wires": [
[
"4c790912771b89dc"
]
]
},
{
"id": "5ede70b6fab13b03",
"type": "debug",
"z": "5a9dd923b7459820",
"name": "debug 1",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "filename",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 940,
"y": 260,
"x": 900,
"y": 880,
"wires": []
},
{
"id": "737f4bb0df2e799c",
"type": "file",
"z": "5a9dd923b7459820",
"name": "Write json to disk",
"filename": "filename",
"filenameType": "msg",
"appendNewline": true,
"createDir": false,
"overwriteFile": true,
"encoding": "none",
"x": 190,
"y": 500,
"wires": [
[
"metabase_output_debug",
"63ed8c262fa7753b"
]
]
},
{
"id": "3cc11d24.ff01a2",
"type": "comment",
+1 -1
View File
@@ -1,2 +1,2 @@
[{"ownerGroup": "p21679", "copies": "oneCopyBig", "size": "4433360998", "packedSize": "4436746240", "beamline": "gps", "department": "3000"}, {"ownerGroup": "p21742", "copies": "oneCopyBig", "size": "9.2553866758065E13", "packedSize": "9.255464433664E13", "beamline": "SARESB", "department": "6000"}, {"ownerGroup": "p22127", "copies": "oneCopyBig", "size": "255470353", "packedSize": "255918080", "beamline": "FOCUS", "department": "3000"}, {"ownerGroup": "p22057", "copies": "oneCopyBig", "size": "18319205106", "packedSize": "18320035840", "beamline": "lem", "department": "3000"}, {"ownerGroup": "p10787", "copies": "oneCopyBig", "size": "7.56620277E9", "packedSize": "7.570944E9", "beamline": "X04SA", "department": "6000"}, {"ownerGroup": "p13142", "copies": "twoCopiesBig", "size": "1.950315768183E12", "packedSize": "1.95031387136E12", "beamline": "X02DA", "department": "6000"}, {"ownerGroup": "p21886", "copies": "oneCopyBig", "size": "60747413", "packedSize": "60856320", "beamline": "ZEBRA", "department": "3000"}, {"ownerGroup": "p19535", "copies": "oneCopyBig", "size": "6.62969376868E11", "packedSize": "6.6308801536E11", "beamline": "X12SA", "department": "6000"}, {"ownerGroup": "p19719", "copies": "oneCopyBig", "size": "1.555025018923E12", "packedSize": "1.55506786304E12", "beamline": "X08SA", "department": "6000"}, {"ownerGroup": "p21640", "copies": "oneCopyBig", "size": "1.989830522204E12", "packedSize": "1.98987122688E12", "beamline": "SARESC", "department": "6000"}, {"ownerGroup": "p22028", "copies": "oneCopyBig", "size": "1724612455", "packedSize": "1725736960", "beamline": "flame", "department": "3000"}, {"ownerGroup": "p18748", "copies": "oneCopyBig", "size": "5.612534516314E12", "packedSize": "5.6140198912E12", "beamline": "X02DA", "department": "6000"}, {"ownerGroup": "p14462", "copies": "oneCopySmall", "size": "6208966", "packedSize": "6922240", "beamline": "X06DA", "department": "6000"}, {"ownerGroup": "p18026", "copies": "twoCopiesBig", "size": "5.879929403955E12", "packedSize": "5.88092916736E12", "beamline": "X02DA", "department": "6000"}, {"ownerGroup": "p18098", "copies": "oneCopyBig", "size": "2.566008027956E12", "packedSize": "2.56600849408E12", "beamline": "X08SA", "department": "6000"}, {"ownerGroup": "p19027", "copies": "oneCopyBig", "size": "2012880766", "packedSize": "2014228480", "beamline": "gpd", "department": "3000"}, {"ownerGroup": "p20390", "copies": "oneCopySmall", "size": "10041", "packedSize": "20480", "beamline": "TASP", "department": "3000"}, {"ownerGroup": "p22669", "copies": "oneCopyBig", "size": "379815545", "packedSize": "380160000", "beamline": "FOCUS", "department": "3000"}, {"ownerGroup": "p23118", "copies": "oneCopyBig", "size": "12102505", "packedSize": "12185600", "beamline": "flame", "department": "3000"}, {"ownerGroup": "p21950", "copies": "oneCopySmall", "size": "10023553", "packedSize": "10178560", "beamline": "flame", "department": "3000"}, {"ownerGroup": "p22277", "copies": "oneCopyBig", "size": "1.3726053288712E13", "packedSize": "1.372623541248E13", "beamline": "SATESE", "department": "6000"}, {"ownerGroup": "p21094", "copies": "oneCopyBig", "size": "2414519512", "packedSize": "2415605760", "beamline": "hal-9500", "department": "3000"}, {"ownerGroup": "p21089", "copies": "oneCopySmall", "size": "636685", "packedSize": "645120", "beamline": "lem", "department": "3000"}, {"ownerGroup": "p20602", "copies": "oneCopyBig", "size": "1.2432326062619E13", "packedSize": "1.243232715776E13", "beamline": "X02DA", "department": "6000"}, {"ownerGroup": "p22767", "copies": "oneCopyBig", "size": "15214173342", "packedSize": "15215329280", "beamline": "lem", "department": "3000"}, {"ownerGroup": "p11449", "copies": "twoCopiesBig", "size": "2.7652087843E10", "packedSize": "2.765213696E10", "beamline": "X08SA", "department": "6000"}, {"ownerGroup": "p10026", "copies": "twoCopiesBig", "size": "2.34555181699E11", "packedSize": "2.3455509504E11", "beamline": "X06SA", "department": "6000"}, {"ownerGroup": "p21957", "copies": "oneCopyBig", "size": "4.0529589145807E13", "packedSize": "4.052973850624E13", "beamline": "SARESA", "department": "6000"}, {"ownerGroup": "p22502", "copies": "oneCopyBig", "size": "229052165", "packedSize": "232417280", "beamline": "SANS-I", "department": "3000"}, {"ownerGroup": "p17164", "copies": "oneCopyBig", "size": "3049608474", "packedSize": "3052113920", "beamline": "X09LA", "department": "6000"}, {"ownerGroup": "p18874", "copies": "oneCopyBig", "size": "1.676594832595E12", "packedSize": "1.67674580992E12", "beamline": "X12SA", "department": "6000"}, {"ownerGroup": "p10414", "copies": "twoCopiesBig", "size": "1.43057126E11", "packedSize": "1.4305709056E11", "beamline": "X02DA", "department": "6000"}, {"ownerGroup": "p12358", "copies": "twoCopiesBig", "size": "1.882568003831E12", "packedSize": "1.88256703488E12", "beamline": "X02DA", "department": "6000"}, {"ownerGroup": "p22590", "copies": "oneCopyBig", "size": "2.360727258761E12", "packedSize": "2.3Line truncated
[{"ownerGroup": "p19140", "copies": "oneCopySmall", "size": "66111911", "packedSize": "70543360", "beamline": "X12SA", "department": "6000"}, {"ownerGroup": "p17301", "copies": "twoCopiesBig", "size": "4.4694875969E10", "packedSize": "4.469492736E10", "beamline": "X12SA", "department": "6000"}, {"ownerGroup": "p17623", "copies": "twoCopiesBig", "size": "3.140200456288E12", "packedSize": "3.14055820288E12", "beamline": "X02DA", "department": "6000"}, {"ownerGroup": "p17046", "copies": "twoCopiesBig", "size": "8.98859082265E11", "packedSize": "8.9885917184E11", "beamline": "X12SA", "department": "6000"}, {"ownerGroup": "p17271", "copies": "oneCopyBig", "size": "2.872404978633E12", "packedSize": "2.87256215552E12", "beamline": "X08SA", "department": "6000"}, {"ownerGroup": "p21921", "copies": "oneCopySmall", "size": "218292", "packedSize": "358400", "beamline": "ZEBRA", "department": "3000"}, {"ownerGroup": "p19781", "copies": "oneCopyBig", "size": "12603164514", "packedSize": "12606638080", "beamline": "hal-9500", "department": "3000"}, {"ownerGroup": "p19103", "copies": "oneCopyBig", "size": "1641282095", "packedSize": "1642076160", "beamline": "hal-9500", "department": "3000"}, {"ownerGroup": "p11798", "copies": "twoCopiesBig", "size": "2.441050779424E12", "packedSize": "2.44105099264E12", "beamline": "X02DA", "department": "6000"}, {"ownerGroup": "p22191", "copies": "oneCopyBig", "size": "1742729350", "packedSize": "1743800320", "beamline": "flame", "department": "3000"}, {"ownerGroup": "p23032", "copies": "oneCopySmall", "size": "1441", "packedSize": "10240", "beamline": "SARESC", "department": "6000"}, {"ownerGroup": "p17785", "copies": "oneCopyBig", "size": "2.652378428E9", "packedSize": "2.66489856E9", "beamline": "X11MA", "department": "6000"}, {"ownerGroup": "p22302", "copies": "oneCopyBig", "size": "164197583", "packedSize": "166154240", "beamline": "DMC", "department": "3000"}, {"ownerGroup": "p17881", "copies": "oneCopySmall", "size": "16205806", "packedSize": "16435200", "beamline": "X12SA", "department": "6000"}, {"ownerGroup": "p16669", "copies": "oneCopyBig", "size": "1.320662990447E12", "packedSize": "1.32105278464E12", "beamline": "X04DB", "department": "6000"}, {"ownerGroup": "p19803", "copies": "oneCopyBig", "size": "2223125015", "packedSize": "2225592320", "beamline": "gpd", "department": "3000"}, {"ownerGroup": "p17577", "copies": "twoCopiesBig", "size": "5.1802810956E10", "packedSize": "5.180285952E10", "beamline": "X12SA", "department": "6000"}, {"ownerGroup": "p22199", "copies": "oneCopyBig", "size": "7.61970584311E11", "packedSize": "7.62027776E11", "beamline": "SARESC", "department": "6000"}, {"ownerGroup": "p11120", "copies": "twoCopiesBig", "size": "3.01341402519E11", "packedSize": "3.0134136832E11", "beamline": "X02DA", "department": "6000"}, {"ownerGroup": "p22836", "copies": "oneCopyBig", "size": "8330369", "packedSize": "8366080", "beamline": "ZEBRA", "department": "3000"}, {"ownerGroup": "p19216", "copies": "oneCopyBig", "size": "4.70793605626E11", "packedSize": "4.7080773632E11", "beamline": "X04SA", "department": "6000"}, {"ownerGroup": "p22475", "copies": "oneCopyBig", "size": "14906972436", "packedSize": "14908293120", "beamline": "lem", "department": "3000"}, {"ownerGroup": "p17276", "copies": "oneCopyBig", "size": "2.7034555969E10", "packedSize": "2.706598912E10", "beamline": "X09LA", "department": "6000"}, {"ownerGroup": "p20229", "copies": "oneCopySmall", "size": "283208", "packedSize": "296960", "beamline": "X09LA", "department": "6000"}, {"ownerGroup": "p21025", "copies": "oneCopyBig", "size": "3836110895", "packedSize": "3838545920", "beamline": "flame", "department": "3000"}, {"ownerGroup": "p22336", "copies": "oneCopySmall", "size": "31177235", "packedSize": "32901120", "beamline": "HRPT", "department": "3000"}, {"ownerGroup": "p19581", "copies": "oneCopyBig", "size": "3.9618130914E10", "packedSize": "3.9627008E10", "beamline": "X12SA", "department": "6000"}, {"ownerGroup": "p20124", "copies": "oneCopyBig", "size": "40734658984", "packedSize": "40745871360", "beamline": "X12SA", "department": "6000"}, {"ownerGroup": "p17616", "copies": "oneCopyBig", "size": "3.9590469466976E13", "packedSize": "3.9591334144E13", "beamline": "X02DA", "department": "6000"}, {"ownerGroup": "p17081", "copies": "oneCopyBig", "size": "9.69974439425E11", "packedSize": "9.7016717312E11", "beamline": "X02DA", "department": "6000"}, {"ownerGroup": "p19069", "copies": "oneCopyBig", "size": "51130533172", "packedSize": "51133900800", "beamline": "lem", "department": "3000"}, {"ownerGroup": "p18141", "copies": "oneCopyBig", "size": "2.449328598413E12", "packedSize": "2.44933204992E12", "beamline": "X08SA", "department": "6000"}, {"ownerGroup": "p19899", "copies": "oneCopyBig", "size": "2293528733", "packedSize": "2295418880", "beamline": "gpd", "department": "3000"}, {"ownerGroup": "p21772", "copies": "oneCopyBig", "size": "185521288", "packedSize": "186152960", "beamline": "DMC", "departmentLine truncated