Skip to content
Source
Sign inSign up
TanStack/db
Open History to see the last commit

QueueStrategyOptions.md

57 lines1.3 KB

1---
2id: QueueStrategyOptions
3title: QueueStrategyOptions
4---
5​
6Defined in: [packages/db/src/strategies/types.ts:50](https://github.com/TanStack/db/blob/main/packages/db/src/strategies/types.ts#L50)
7​
8Options for queue strategy
9Processes all executions in order (FIFO/LIFO)
10​
11## Properties
12​
13### addItemsTo?
14​
15```ts
16optional addItemsTo: "front" | "back";
17```
18​
19Defined in: [packages/db/src/strategies/types.ts:56](https://github.com/TanStack/db/blob/main/packages/db/src/strategies/types.ts#L56)
20​
21Where to add new items in the queue
22​
23***
24​
25### getItemsFrom?
26​
27```ts
28optional getItemsFrom: "front" | "back";
29```
30​
31Defined in: [packages/db/src/strategies/types.ts:58](https://github.com/TanStack/db/blob/main/packages/db/src/strategies/types.ts#L58)
32​
33Where to get items from when processing
34​
35***
36​
37### maxSize?
38​
39```ts
40optional maxSize: number;
41```
42​
43Defined in: [packages/db/src/strategies/types.ts:54](https://github.com/TanStack/db/blob/main/packages/db/src/strategies/types.ts#L54)
44​
45Maximum number of waiting items; overflow rejects its transaction. A value of `0` rejects every mutation, including the first.
46​
47***
48​
49### wait?
50​
51```ts
52optional wait: number;
53```
54​
55Defined in: [packages/db/src/strategies/types.ts:52](https://github.com/TanStack/db/blob/main/packages/db/src/strategies/types.ts#L52)
56​
57Wait time between processing queue items (milliseconds)