diff --git a/src/db.ts b/src/db.ts index 6e9d596..b1e48fb 100644 --- a/src/db.ts +++ b/src/db.ts @@ -4,3 +4,4 @@ export const db = await new Database(Deno.env.get("DB_PATH") || "./neomap.sqlite db.prepare("CREATE TABLE IF NOT EXISTS hexes (hex_id TEXT PRIMARY KEY NOT NULL CHECK(hex_id GLOB '[0-9a-f]*'), wifi INTEGER DEFAULT 0 NOT NULL, gsm INTEGER DEFAULT 0 NOT NULL, wcdma INTEGER DEFAULT 0 NOT NULL, lte INTEGER DEFAULT 0 NOT NULL, ble INTEGER DEFAULT 0 NOT NULL, created_at INTEGER DEFAULT (strftime('%s', 'now')) NOT NULL, last_update INTEGER DEFAULT (strftime('%s', 'now')) NOT NULL);").run(); db.exec("PRAGMA journal_mode = WAL;"); db.exec("PRAGMA busy_timeout = 5000;"); +db.exec("PRAGMA synchronous = NORMAL;"); diff --git a/src/server.ts b/src/server.ts index fcd23d3..e1b26f2 100644 --- a/src/server.ts +++ b/src/server.ts @@ -9,8 +9,6 @@ import { db } from "./db.ts"; import { kv } from "./kv.ts"; import { Geosubmit } from "./types.d.ts"; -import { stats } from "./html/stats.ts"; - const app = new Hono(); app.use(logger(), compress());