TinyBase logoTinyBase

getRequestTimeoutSeconds

The getRequestTimeoutSeconds method is used to specify how long the Durable Object will wait for synchronization responses and incomplete fragments.

getRequestTimeoutSeconds(): number
returnsnumber

The number of seconds to wait before timing out.

Return a number of seconds to use as the timeout. The default is 1.

Example

This example waits up to 10 seconds for synchronization responses and incomplete fragments.

import {WsServerDurableObject} from 'tinybase/synchronizers/synchronizer-ws-server-durable-object';

export class MyDurableObject extends WsServerDurableObject {
  getRequestTimeoutSeconds() {
    return 10;
  }
}

Since

v9.0.0