Add account based multiplayer hosting and bug report retention
This commit is contained in:
@@ -3,6 +3,7 @@ import { randomUUID } from "node:crypto";
|
||||
import { after } from "next/server";
|
||||
import { admin, required } from "./supabase";
|
||||
import { LinearSupportClient } from "./linear-support-client";
|
||||
import { scheduleBugCleanup } from "./bug-lifecycle";
|
||||
|
||||
export function supportReady() {
|
||||
return !!(
|
||||
@@ -58,13 +59,20 @@ export async function syncBugReport(id: string) {
|
||||
.update({
|
||||
issue_synced: true,
|
||||
linear_identifier: issue.identifier,
|
||||
state: "open",
|
||||
})
|
||||
.eq("id", id)
|
||||
.eq("lease_owner", worker)
|
||||
.select("id")
|
||||
.single(),
|
||||
);
|
||||
required(
|
||||
await db
|
||||
.from("bug_reports")
|
||||
.update({ state: "open" })
|
||||
.eq("id", id)
|
||||
.eq("state", "pending")
|
||||
.select("id"),
|
||||
);
|
||||
}
|
||||
required(
|
||||
await db
|
||||
@@ -102,6 +110,7 @@ export async function syncBugReport(id: string) {
|
||||
.eq("lease_owner", worker)
|
||||
.select("id"),
|
||||
);
|
||||
await scheduleBugCleanup(id);
|
||||
} catch {
|
||||
console.error("Bug report delivery paused; the saved report will retry.");
|
||||
required(
|
||||
|
||||
Reference in New Issue
Block a user