// Proof-of-wiring function. Triggered by "test/ping". Remove after Inngest is confirmed working.
import { inngest } from "@/lib/inngest/client";

export const pingFunction = inngest.createFunction(
  { id: "ping", triggers: [{ event: "test/ping" }] },
  async ({ step }) => {
    const result = await step.run("ping-step", () => ({
      ok: true,
      at: new Date().toISOString(),
    }));
    console.log("[inngest:ping]", result);
    return result;
  },
);
