ChainGraph API Documentation / @badaitech/chaingraph-executor / server / InMemoryTaskQueue
Class: InMemoryTaskQueue
Defined in: packages/chaingraph-executor/server/implementations/local/InMemoryTaskQueue.ts:19
In-memory implementation of ITaskQueue for local development Uses a simple array-based queue with direct execution
Implements
Constructors
Constructor
new InMemoryTaskQueue():
InMemoryTaskQueue
Returns
InMemoryTaskQueue
Methods
close()
close():
Promise<void>
Defined in: packages/chaingraph-executor/server/implementations/local/InMemoryTaskQueue.ts:75
Close the queue and cleanup resources
Returns
Promise<void>
Implementation of
consumeTasks()
consumeTasks(
handler):Promise<void>
Defined in: packages/chaingraph-executor/server/implementations/local/InMemoryTaskQueue.ts:41
Start consuming tasks from the queue Handler is called for each task with optional context for manual offset management
Parameters
handler
TaskHandler
Returns
Promise<void>
Implementation of
getPendingCount()
getPendingCount():
Promise<number>
Defined in: packages/chaingraph-executor/server/implementations/local/InMemoryTaskQueue.ts:71
Get the number of pending tasks (if available)
Returns
Promise<number>
Implementation of
publishTask()
publishTask(
task):Promise<void>
Defined in: packages/chaingraph-executor/server/implementations/local/InMemoryTaskQueue.ts:27
Publish an execution task to the queue
Parameters
task
Returns
Promise<void>
Implementation of
stopConsuming()
stopConsuming():
Promise<void>
Defined in: packages/chaingraph-executor/server/implementations/local/InMemoryTaskQueue.ts:58
Stop consuming tasks
Returns
Promise<void>