Skip to main content
Latest
function createConcurrentSink
Re-export
import { createConcurrentSink } from "https://deno.land/x/grammy_runner@v2.0.3/mod.ts";

Creates an update sink that handles updates concurrently. In other words, new updates will be fetched—and their processing will be started—before the processing of older updates completes. The maximal number of concurrently handled updates can be limited (default: 500).

In the context of grammY, this is the sink that is created by default when calling run(bot).

Type Parameters

Y
optional
R = unknown

Parameters

handler: UpdateConsumer<Y>

Update consumer

errorHandler: (error: R) => Promise<void>

Error handler for when the update consumer rejects

optional
options: SinkOptions<Y> = [UNSUPPORTED]

Maximal number of updates to process concurrently

Returns

An update sink that handles updates concurrently