mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2026-07-26 01:44:53 +10:00
- Use browserless over gotenberg
- Implement functionality to move items between sections or pages - Enhance custom sections to have a `type` property - Update the v4 importer to account for custom sections - Update healthcheck to be a simple curl command - Update dependencies to latest and a lot more changes
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { createFileRoute } from "@tanstack/react-router";
|
||||
import { sql } from "drizzle-orm";
|
||||
import { db } from "@/integrations/drizzle/client";
|
||||
import { printerService } from "@/integrations/orpc/services/printer";
|
||||
import { getStorageService } from "@/integrations/orpc/services/storage";
|
||||
|
||||
function isUnhealthy(check: unknown): boolean {
|
||||
@@ -20,6 +21,7 @@ async function handler() {
|
||||
timestamp: new Date().toISOString(),
|
||||
uptime: `${process.uptime().toFixed(2)}s`,
|
||||
database: await checkDatabase(),
|
||||
printer: await checkPrinter(),
|
||||
storage: await checkStorage(),
|
||||
};
|
||||
|
||||
@@ -50,6 +52,19 @@ async function checkDatabase() {
|
||||
}
|
||||
}
|
||||
|
||||
async function checkPrinter() {
|
||||
try {
|
||||
const result = await printerService.healthcheck();
|
||||
|
||||
return { status: "healthy", ...result };
|
||||
} catch (error) {
|
||||
return {
|
||||
status: "unhealthy",
|
||||
error: error instanceof Error ? error.message : "Unknown error",
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
async function checkStorage() {
|
||||
try {
|
||||
const storageService = getStorageService();
|
||||
|
||||
Reference in New Issue
Block a user