mirror of
https://github.com/LukeHagar/dokploy.git
synced 2025-12-06 04:19:37 +00:00
[autofix.ci] apply automated fixes
This commit is contained in:
@@ -7,7 +7,14 @@ import {
|
|||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
status: "running" | "error" | "done" | "idle" | "cancelled" | undefined | null;
|
status:
|
||||||
|
| "running"
|
||||||
|
| "error"
|
||||||
|
| "done"
|
||||||
|
| "idle"
|
||||||
|
| "cancelled"
|
||||||
|
| undefined
|
||||||
|
| null;
|
||||||
className?: string;
|
className?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -36,7 +43,10 @@ export const StatusTooltip = ({ status, className }: Props) => {
|
|||||||
)}
|
)}
|
||||||
{status === "cancelled" && (
|
{status === "cancelled" && (
|
||||||
<div
|
<div
|
||||||
className={cn("size-3.5 rounded-full bg-muted-foreground", className)}
|
className={cn(
|
||||||
|
"size-3.5 rounded-full bg-muted-foreground",
|
||||||
|
className,
|
||||||
|
)}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{status === "running" && (
|
{status === "running" && (
|
||||||
|
|||||||
@@ -3,15 +3,19 @@ import { eq } from "drizzle-orm";
|
|||||||
import { db } from "../../db/index";
|
import { db } from "../../db/index";
|
||||||
|
|
||||||
export const initCancelDeployments = async () => {
|
export const initCancelDeployments = async () => {
|
||||||
try {
|
try {
|
||||||
console.log("Setting up cancel deployments....");
|
console.log("Setting up cancel deployments....");
|
||||||
|
|
||||||
const result = await db.update(deployments).set({
|
const result = await db
|
||||||
status: "cancelled",
|
.update(deployments)
|
||||||
}).where(eq(deployments.status, "running")).returning();
|
.set({
|
||||||
|
status: "cancelled",
|
||||||
|
})
|
||||||
|
.where(eq(deployments.status, "running"))
|
||||||
|
.returning();
|
||||||
|
|
||||||
console.log(`Cancelled ${result.length} deployments`);
|
console.log(`Cancelled ${result.length} deployments`);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user