mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
feat(notifications): add emails and methos for each action
This commit is contained in:
@@ -23,6 +23,7 @@ import {
|
||||
import { findMariadbByBackupId } from "../services/mariadb";
|
||||
import { findMongoByBackupId } from "../services/mongo";
|
||||
import { findMySqlByBackupId } from "../services/mysql";
|
||||
import { sendDatabaseBackupNotifications } from "../services/notification";
|
||||
import { findPostgresByBackupId } from "../services/postgres";
|
||||
|
||||
export const backupRouter = createTRPCRouter({
|
||||
@@ -90,6 +91,7 @@ export const backupRouter = createTRPCRouter({
|
||||
const backup = await findBackupById(input.backupId);
|
||||
const postgres = await findPostgresByBackupId(backup.backupId);
|
||||
await runPostgresBackup(postgres, backup);
|
||||
|
||||
return true;
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
|
||||
@@ -35,6 +35,7 @@ import { TRPCError } from "@trpc/server";
|
||||
import { scheduleJob, scheduledJobs } from "node-schedule";
|
||||
import { appRouter } from "../root";
|
||||
import { findAdmin, updateAdmin } from "../services/admin";
|
||||
import { sendDockerCleanupNotifications } from "../services/notification";
|
||||
import {
|
||||
getDokployImage,
|
||||
getDokployVersion,
|
||||
@@ -86,6 +87,7 @@ export const settingsRouter = createTRPCRouter({
|
||||
await cleanUpUnusedImages();
|
||||
await cleanUpDockerBuilder();
|
||||
await cleanUpSystemPrune();
|
||||
|
||||
return true;
|
||||
}),
|
||||
cleanMonitoring: adminProcedure.mutation(async () => {
|
||||
@@ -144,6 +146,7 @@ export const settingsRouter = createTRPCRouter({
|
||||
await cleanUpUnusedImages();
|
||||
await cleanUpDockerBuilder();
|
||||
await cleanUpSystemPrune();
|
||||
await sendDockerCleanupNotifications();
|
||||
});
|
||||
} else {
|
||||
const currentJob = scheduledJobs["docker-cleanup"];
|
||||
|
||||
Reference in New Issue
Block a user