This commit is contained in:
parent
0c32957d7f
commit
4a654d0b94
2 changed files with 24 additions and 18 deletions
25
broker.ts
25
broker.ts
|
@ -40,7 +40,8 @@ async function sendEmail(content: string) {
|
|||
to: "Christopher.Hase@telekom.com;test@mailhog.local",
|
||||
subject: "Horoscope from MailHog",
|
||||
text: content,
|
||||
html: "<p> ${content} </p>"
|
||||
//html: "<p> ${content} </p>"
|
||||
html: html(content)
|
||||
});
|
||||
|
||||
console.log("E-Mail sent: ", info.messageId);
|
||||
|
@ -49,7 +50,7 @@ async function sendEmail(content: string) {
|
|||
}
|
||||
}
|
||||
|
||||
//Sleep. To avoid: Completed -> Terminated -> CrashLoopBackOff
|
||||
//Sleep. To avoid issue in pod: Completed -> Terminated -> CrashLoopBackOff
|
||||
async function sleep() {
|
||||
console.log("Go to sleep: ", new Date().toISOString());
|
||||
|
||||
|
@ -59,3 +60,23 @@ async function sleep() {
|
|||
}, 3600000);
|
||||
}
|
||||
|
||||
|
||||
|
||||
function html(input: string): string {
|
||||
|
||||
// Zerlege den String in einzelne Zeilen
|
||||
const lines = input.split("\n");
|
||||
|
||||
// Bearbeite jede Zeile (z.B. trimme Leerzeichen und füge einen Prefix hinzu)
|
||||
const processedLines = lines.map(line => `> ${line.trim()}`);
|
||||
|
||||
// Füge die Zeilen wieder zu einem String zusammen
|
||||
return processedLines.join("\n");
|
||||
}
|
||||
|
||||
//TODO: process every line...
|
||||
function processLine(input: string): string {
|
||||
|
||||
return "";
|
||||
}
|
||||
|
|
@ -15,19 +15,4 @@ spec:
|
|||
containers:
|
||||
- image: forgejo.edf-bootstrap.cx.fg1.ffm.osc.live/devfw-cicd/iching-broker:main
|
||||
name: iching-broker
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: 8080
|
||||
initialDelaySeconds: 40
|
||||
periodSeconds: 25
|
||||
timeoutSeconds: 15
|
||||
failureThreshold: 3
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /ready
|
||||
port: 8080
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 20
|
||||
timeoutSeconds: 13
|
||||
successThreshold: 2
|
||||
|
||||
|
|
Loading…
Reference in a new issue