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

AsyncQueuerState.md

240 lines4.5 KB

1---
2id: AsyncQueuerState
3title: AsyncQueuerState
4---
5​
6Defined in: [async-queuer.ts:9](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/async-queuer.ts#L9)
7​
8## Type Parameters
9​
10### TValue
11​
12`TValue`
13​
14## Properties
15​
16### activeItems
17​
18```ts
19activeItems: TValue[];
20```
21​
22Defined in: [async-queuer.ts:13](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/async-queuer.ts#L13)
23​
24Items currently being processed by the queuer
25​
26***
27​
28### addItemCount
29​
30```ts
31addItemCount: number;
32```
33​
34Defined in: [async-queuer.ts:17](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/async-queuer.ts#L17)
35​
36Number of times addItem has been called (for reduction calculations)
37​
38***
39​
40### errorCount
41​
42```ts
43errorCount: number;
44```
45​
46Defined in: [async-queuer.ts:21](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/async-queuer.ts#L21)
47​
48Number of task executions that have resulted in errors
49​
50***
51​
52### executionCount
53​
54```ts
55executionCount: number;
56```
57​
58Defined in: [async-queuer.ts:25](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/async-queuer.ts#L25)
59​
60Number of times execute has been called
61​
62***
63​
64### expirationCount
65​
66```ts
67expirationCount: number;
68```
69​
70Defined in: [async-queuer.ts:29](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/async-queuer.ts#L29)
71​
72Number of items that have been removed from the queue due to expiration
73​
74***
75​
76### isEmpty
77​
78```ts
79isEmpty: boolean;
80```
81​
82Defined in: [async-queuer.ts:33](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/async-queuer.ts#L33)
83​
84Whether the queuer has no items to process (items array is empty)
85​
86***
87​
88### isExecuting
89​
90```ts
91isExecuting: boolean;
92```
93​
94Defined in: [async-queuer.ts:37](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/async-queuer.ts#L37)
95​
96Whether the queuer is currently executing
97​
98***
99​
100### isFull
101​
102```ts
103isFull: boolean;
104```
105​
106Defined in: [async-queuer.ts:41](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/async-queuer.ts#L41)
107​
108Whether the queuer has reached its maximum capacity
109​
110***
111​
112### isIdle
113​
114```ts
115isIdle: boolean;
116```
117​
118Defined in: [async-queuer.ts:45](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/async-queuer.ts#L45)
119​
120Whether the queuer is not currently processing any items
121​
122***
123​
124### isRunning
125​
126```ts
127isRunning: boolean;
128```
129​
130Defined in: [async-queuer.ts:49](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/async-queuer.ts#L49)
131​
132Whether the queuer is active and will process items automatically
133​
134***
135​
136### items
137​
138```ts
139items: TValue[];
140```
141​
142Defined in: [async-queuer.ts:53](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/async-queuer.ts#L53)
143​
144Array of items currently waiting to be processed
145​
146***
147​
148### itemTimestamps
149​
150```ts
151itemTimestamps: number[];
152```
153​
154Defined in: [async-queuer.ts:57](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/async-queuer.ts#L57)
155​
156Timestamps when items were added to the queue for expiration tracking
157​
158***
159​
160### lastResult
161​
162```ts
163lastResult: any;
164```
165​
166Defined in: [async-queuer.ts:61](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/async-queuer.ts#L61)
167​
168The result from the most recent task execution
169​
170***
171​
172### pendingTick
173​
174```ts
175pendingTick: boolean;
176```
177​
178Defined in: [async-queuer.ts:65](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/async-queuer.ts#L65)
179​
180Whether the queuer has a pending timeout for processing the next item
181​
182***
183​
184### rejectionCount
185​
186```ts
187rejectionCount: number;
188```
189​
190Defined in: [async-queuer.ts:69](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/async-queuer.ts#L69)
191​
192Number of items that have been rejected from being added to the queue
193​
194***
195​
196### settleCount
197​
198```ts
199settleCount: number;
200```
201​
202Defined in: [async-queuer.ts:73](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/async-queuer.ts#L73)
203​
204Number of task executions that have completed (either successfully or with errors)
205​
206***
207​
208### size
209​
210```ts
211size: number;
212```
213​
214Defined in: [async-queuer.ts:77](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/async-queuer.ts#L77)
215​
216Number of items currently in the queue
217​
218***
219​
220### status
221​
222```ts
223status: "idle" | "running" | "stopped";
224```
225​
226Defined in: [async-queuer.ts:81](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/async-queuer.ts#L81)
227​
228Current processing status - 'idle' when not processing, 'running' when active, 'stopped' when paused
229​
230***
231​
232### successCount
233​
234```ts
235successCount: number;
236```
237​
238Defined in: [async-queuer.ts:85](https://github.com/TanStack/pacer/blob/main/packages/pacer/src/async-queuer.ts#L85)
239​
240Number of task executions that have completed successfully