feat: add fallback memory relay

This commit is contained in:
2024-01-19 11:56:07 +00:00
parent 8e33d10319
commit cb0b75c652
8 changed files with 202 additions and 103 deletions

View File

@ -11,11 +11,7 @@ import { ProfileCacheRelayWorker } from "./ProfileWorkeCache";
export const Relay = new WorkerRelayInterface(WorkerRelayPath);
export async function initRelayWorker() {
try {
if (await Relay.init()) {
if (await Relay.open()) {
await Relay.migrate();
}
}
await Relay.init("relay.db");
} catch (e) {
console.error(e);
}