remove old chat rooms
This commit is contained in:
parent
f36967362f
commit
d1705c88e9
|
|
@ -36,6 +36,7 @@ export class TldrawDurableObject {
|
||||||
private readonly ctx: DurableObjectState,
|
private readonly ctx: DurableObjectState,
|
||||||
env: Environment
|
env: Environment
|
||||||
) {
|
) {
|
||||||
|
console.log("hello from durable object")
|
||||||
this.r2 = env.TLDRAW_BUCKET
|
this.r2 = env.TLDRAW_BUCKET
|
||||||
|
|
||||||
ctx.blockConcurrencyWhile(async () => {
|
ctx.blockConcurrencyWhile(async () => {
|
||||||
|
|
@ -99,7 +100,7 @@ export class TldrawDurableObject {
|
||||||
const initialSnapshot = roomFromBucket
|
const initialSnapshot = roomFromBucket
|
||||||
? ((await roomFromBucket.json()) as RoomSnapshot)
|
? ((await roomFromBucket.json()) as RoomSnapshot)
|
||||||
: undefined
|
: undefined
|
||||||
|
console.log("room data", roomFromBucket)
|
||||||
// create a new TLSocketRoom. This handles all the sync protocol & websocket connections.
|
// create a new TLSocketRoom. This handles all the sync protocol & websocket connections.
|
||||||
// it's up to us to persist the room state to R2 when needed though.
|
// it's up to us to persist the room state to R2 when needed though.
|
||||||
return new TLSocketRoom<TLRecord, void>({
|
return new TLSocketRoom<TLRecord, void>({
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue