Skip to content

Commit

Permalink
remove tiered
Browse files Browse the repository at this point in the history
  • Loading branch information
tlgimenes committed Mar 16, 2024
1 parent c2fc494 commit 6466767
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions src/realtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -409,21 +409,22 @@ export class Realtime implements DurableObject {
return;
}
const durableFS = createDurableFS(state);
this.fs = tieredFS(memFS, durableFS);
// this.fs = tieredFS(memFS, durableFS);
this.fs = durableFS
// init memFS with durable content
this.state.blockConcurrencyWhile(async () => {
const paths = await durableFS.readdir("/");
// this.state.blockConcurrencyWhile(async () => {
// const paths = await durableFS.readdir("/");

for (const path of paths) {
const content = await durableFS.readFile(path);
// for (const path of paths) {
// const content = await durableFS.readFile(path);

if (!content) {
continue;
}
// if (!content) {
// continue;
// }

await memFS.writeFile(path, content);
}
});
// await memFS.writeFile(path, content);
// }
// });
}

broadcast(msg: ServerEvent) {
Expand Down

0 comments on commit 6466767

Please sign in to comment.