Skip to content

Commit cd2ef13

Browse files
authored
Merge branch 'EUMETNET:main' into main
2 parents 505baeb + c868993 commit cd2ef13

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

api/load-test/locust-ewc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def get_data_area_single_parameter_last_hour(self):
7474
top = cy + sz
7575
polygon = f"POLYGON(({left} {bottom},{right} {bottom},{right} {top},{left} {top},{left} {bottom}))"
7676
url = f"/collections/observations/area?coords={polygon}&standard_names={standard_name}&datetime={dt_string}/.."
77-
self.client.get(url, name=f"area {sz*2.0}deg x {sz*2.0}deg x 1h", headers=headers)
77+
self.client.get(url, name=f"area {sz * 2.0}deg x {sz * 2.0}deg x 1h", headers=headers)
7878
# if sz == 2.0:
7979
# j = response.json()
8080
# # print(sz*2.0)

datastore/datastore/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# docker image rm -f main
66
# ...
77

8-
FROM golang:1.21-bookworm
8+
FROM golang:1.24-bookworm
99

1010
ARG VERSION_GRPC_HEALTH_PROBE=v0.4.19
1111

ingest/api/send_mqtt.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1+
import os
12
import logging
23
import json
34
from paho.mqtt import client as mqtt_client
45
from fastapi import HTTPException
56

67
logger = logging.getLogger(__name__)
78

9+
if "MQTT_TOPIC_PREPEND" in os.environ:
10+
mqtt_topic_prepend = os.getenv("MQTT_TOPIC_PREPEND", "")
11+
mqtt_topic_prepend = mqtt_topic_prepend if mqtt_topic_prepend.endswith("/") else mqtt_topic_prepend + "/"
12+
813

914
def connect_mqtt(mqtt_conf: dict):
1015
def on_connect(client, userdata, flags, rc, properties=None):
@@ -33,7 +38,7 @@ def on_disconnect(client, userdata, flags, rc, properties):
3338

3439
def send_message(topic: str, message: str, client: object):
3540
if len(topic) != 0:
36-
mqtt_topic = topic
41+
mqtt_topic = mqtt_topic_prepend + topic
3742
try:
3843
if isinstance(message, dict):
3944
client.publish(mqtt_topic, json.dumps(message))

0 commit comments

Comments
 (0)