Files
test-convex/convex/actions/redis.ts
2026-01-25 19:18:59 +08:00

22 lines
677 B
TypeScript

// 'use node';
// import { query, mutation, action } from "../_generated/server";
// import { Kevisual } from '@kevisual/ai/browser'
// import { v } from "convex/values";
// import { Redis } from "ioredis";
// const redisClient = new Redis({
// host: process.env.REDIS_HOST,
// password: process.env.REDIS_PASSWORD,
// });
// let time: any = null;
// export const isConnected = action({
// args: {},
// handler: async (ctx) => {
// const result = await redisClient.ping();
// if (time === null) {
// time = new Date();
// }
// console.log("Redis PING at", new Date().toISOString(), "since", time);
// return result === "PONG";
// },
// });