Merge pull request #3780 from Dokploy/3673-dokploy-fails-with-bad-request-after-webui-triggered-update-and-does-not-recover-automatically

fix: add error handling to dokploy restart notifications
This commit is contained in:
Mauricio Siu
2026-02-22 20:06:53 -06:00
committed by GitHub

View File

@@ -19,27 +19,28 @@ import {
} from "./utils";
export const sendDokployRestartNotifications = async () => {
const date = new Date();
const unixDate = ~~(Number(date) / 1000);
const notificationList = await db.query.notifications.findMany({
where: eq(notifications.dokployRestart, true),
with: {
email: true,
discord: true,
telegram: true,
slack: true,
resend: true,
gotify: true,
ntfy: true,
custom: true,
lark: true,
pushover: true,
teams: true,
},
});
try {
const date = new Date();
const unixDate = ~~(Number(date) / 1000);
const notificationList = await db.query.notifications.findMany({
where: eq(notifications.dokployRestart, true),
with: {
email: true,
discord: true,
telegram: true,
slack: true,
resend: true,
gotify: true,
ntfy: true,
custom: true,
lark: true,
pushover: true,
teams: true,
},
});
for (const notification of notificationList) {
const {
for (const notification of notificationList) {
const {
email,
resend,
discord,
@@ -267,5 +268,8 @@ export const sendDokployRestartNotifications = async () => {
} catch (error) {
console.log(error);
}
}
} catch (error) {
console.error("[Dokploy] Restart notifications failed:", error);
}
};