[autofix.ci] apply automated fixes

This commit is contained in:
autofix-ci[bot]
2025-09-27 08:20:36 +00:00
committed by GitHub
parent 6fa8f63277
commit b725861b55
2 changed files with 25 additions and 11 deletions

View File

@@ -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" && (

View File

@@ -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);
} }
}; };