This commit is contained in:
root
2025-09-29 19:18:12 +00:00
parent 241a509a15
commit 38b96da4e7
2 changed files with 71 additions and 4 deletions
+20
View File
@@ -0,0 +1,20 @@
import { db } from './index.js';
const insertRedeployLogStmt = db.prepare(`
INSERT INTO redeploy_logs (stack_id, stack_name, status, message, endpoint)
VALUES (@stackId, @stackName, @status, @message, @endpoint)
`);
export function logRedeployEvent({ stackId, stackName, status, message = null, endpoint = null }) {
try {
insertRedeployLogStmt.run({
stackId: String(stackId),
stackName: stackName ?? 'Unknown',
status,
message,
endpoint
});
} catch (err) {
console.error('❌ Fehler beim Speichern des Redeploy-Logs:', err.message);
}
}