@crawlee/core 4.0.0-beta.65 → 4.0.0-beta.66
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/crawlers/crawler_commons.d.ts +1 -1
- package/crawlers/crawler_commons.d.ts.map +1 -1
- package/enqueue_links/enqueue_links.d.ts +1 -1
- package/enqueue_links/enqueue_links.d.ts.map +1 -1
- package/package.json +5 -5
- package/storages/index.d.ts +1 -4
- package/storages/index.d.ts.map +1 -1
- package/storages/index.js +1 -4
- package/storages/index.js.map +1 -1
- package/storages/request_list.d.ts +1 -1
- package/storages/request_list.d.ts.map +1 -1
- package/storages/request_list.js +2 -2
- package/storages/request_list.js.map +1 -1
- package/storages/request_loader.d.ts +5 -5
- package/storages/request_loader.d.ts.map +1 -1
- package/storages/request_manager.d.ts +10 -1
- package/storages/request_manager.d.ts.map +1 -1
- package/storages/request_manager_tandem.d.ts +13 -2
- package/storages/request_manager_tandem.d.ts.map +1 -1
- package/storages/request_manager_tandem.js +21 -3
- package/storages/request_manager_tandem.js.map +1 -1
- package/storages/request_queue.d.ts +276 -44
- package/storages/request_queue.d.ts.map +1 -1
- package/storages/request_queue.js +576 -212
- package/storages/request_queue.js.map +1 -1
- package/storages/sitemap_request_loader.d.ts +1 -1
- package/storages/sitemap_request_loader.d.ts.map +1 -1
- package/storages/sitemap_request_loader.js +2 -2
- package/storages/sitemap_request_loader.js.map +1 -1
- package/validators.d.ts +4 -0
- package/validators.d.ts.map +1 -1
- package/validators.js +4 -0
- package/validators.js.map +1 -1
- package/storages/request_provider.d.ts +0 -325
- package/storages/request_provider.d.ts.map +0 -1
- package/storages/request_provider.js +0 -619
- package/storages/request_provider.js.map +0 -1
- package/storages/request_queue_v2.d.ts +0 -88
- package/storages/request_queue_v2.d.ts.map +0 -1
- package/storages/request_queue_v2.js +0 -437
- package/storages/request_queue_v2.js.map +0 -1
|
@@ -1,619 +0,0 @@
|
|
|
1
|
-
import { inspect } from 'node:util';
|
|
2
|
-
import { chunkedAsyncIterable, downloadListOfUrls, getObjectType, isAsyncIterable, isIterable, peekableAsyncIterable, sleep, } from '@crawlee/utils';
|
|
3
|
-
import ow from 'ow';
|
|
4
|
-
import { ListDictionary, LruCache } from '@apify/datastructures';
|
|
5
|
-
import { cryptoRandomObjectId } from '@apify/utilities';
|
|
6
|
-
import { Configuration } from '../configuration.js';
|
|
7
|
-
import { Request } from '../request.js';
|
|
8
|
-
import { serviceLocator } from '../service_locator.js';
|
|
9
|
-
import { checkStorageAccess } from './access_checking.js';
|
|
10
|
-
import { resolveStorageIdentifier } from './storage_instance_manager.js';
|
|
11
|
-
import { getRequestId, purgeDefaultStorages, QUERY_HEAD_MIN_LENGTH } from './utils.js';
|
|
12
|
-
export class RequestProvider {
|
|
13
|
-
config;
|
|
14
|
-
id;
|
|
15
|
-
name;
|
|
16
|
-
timeoutSecs = 30;
|
|
17
|
-
clientKey = cryptoRandomObjectId();
|
|
18
|
-
client;
|
|
19
|
-
proxyConfiguration;
|
|
20
|
-
log;
|
|
21
|
-
internalTimeoutMillis = 5 * 60_000; // defaults to 5 minutes, will be overridden by BasicCrawler
|
|
22
|
-
requestLockSecs = 3 * 60; // defaults to 3 minutes, will be overridden by BasicCrawler
|
|
23
|
-
// We can trust these numbers only in a case that queue is used by a single client.
|
|
24
|
-
// This information is returned by getHead() under the hadMultipleClients property.
|
|
25
|
-
assumedTotalCount = 0;
|
|
26
|
-
assumedHandledCount = 0;
|
|
27
|
-
isInitialized = false;
|
|
28
|
-
queueHeadIds = new ListDictionary();
|
|
29
|
-
requestCache;
|
|
30
|
-
recentlyHandledRequestsCache;
|
|
31
|
-
queuePausedForMigration = false;
|
|
32
|
-
lastActivity = new Date();
|
|
33
|
-
isFinishedCalledWhileHeadWasNotEmpty = 0;
|
|
34
|
-
inProgressRequestBatchCount = 0;
|
|
35
|
-
httpClient;
|
|
36
|
-
events;
|
|
37
|
-
constructor(options, config = Configuration.getGlobalConfig()) {
|
|
38
|
-
this.config = config;
|
|
39
|
-
this.id = options.id;
|
|
40
|
-
this.name = options.name;
|
|
41
|
-
this.events = serviceLocator.getEventManager();
|
|
42
|
-
this.client = options.client;
|
|
43
|
-
this.proxyConfiguration = options.proxyConfiguration;
|
|
44
|
-
this.requestCache = new LruCache({ maxLength: options.requestCacheMaxSize });
|
|
45
|
-
this.recentlyHandledRequestsCache = new LruCache({ maxLength: options.recentlyHandledRequestsMaxSize });
|
|
46
|
-
this.log = serviceLocator
|
|
47
|
-
.getLogger()
|
|
48
|
-
.child({ prefix: `${options.logPrefix}(${this.id}, ${this.name ?? 'no-name'})` });
|
|
49
|
-
this.events.on("migrating" /* EventType.MIGRATING */, async () => {
|
|
50
|
-
this.queuePausedForMigration = true;
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Returns the total number of requests in the queue (i.e. pending + handled).
|
|
55
|
-
*
|
|
56
|
-
* Survives restarts and actor migrations.
|
|
57
|
-
*/
|
|
58
|
-
async getTotalCount() {
|
|
59
|
-
const { totalRequestCount } = await this.getInfo();
|
|
60
|
-
return totalRequestCount;
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Returns the total number of pending requests in the queue.
|
|
64
|
-
*
|
|
65
|
-
* Survives restarts and Actor migrations.
|
|
66
|
-
*/
|
|
67
|
-
async getPendingCount() {
|
|
68
|
-
const { totalRequestCount, handledRequestCount } = await this.getInfo();
|
|
69
|
-
return totalRequestCount - handledRequestCount;
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Adds a request to the queue.
|
|
73
|
-
*
|
|
74
|
-
* If a request with the same `uniqueKey` property is already present in the queue,
|
|
75
|
-
* it will not be updated. You can find out whether this happened from the resulting
|
|
76
|
-
* {@link QueueOperationInfo} object.
|
|
77
|
-
*
|
|
78
|
-
* To add multiple requests to the queue by extracting links from a webpage,
|
|
79
|
-
* see the {@link enqueueLinks} helper function.
|
|
80
|
-
*
|
|
81
|
-
* @param requestLike {@link Request} object or vanilla object with request data.
|
|
82
|
-
* Note that the function sets the `uniqueKey` and `id` fields to the passed Request.
|
|
83
|
-
* @param [options] Request queue operation options.
|
|
84
|
-
*/
|
|
85
|
-
async addRequest(requestLike, options = {}) {
|
|
86
|
-
checkStorageAccess();
|
|
87
|
-
this.lastActivity = new Date();
|
|
88
|
-
ow(requestLike, ow.object);
|
|
89
|
-
ow(options, ow.object.exactShape({
|
|
90
|
-
forefront: ow.optional.boolean,
|
|
91
|
-
}));
|
|
92
|
-
const { forefront = false } = options;
|
|
93
|
-
if ('requestsFromUrl' in requestLike) {
|
|
94
|
-
const requests = await this._fetchRequestsFromUrl(requestLike);
|
|
95
|
-
const processedRequests = await this._addFetchedRequests(requestLike, requests, options);
|
|
96
|
-
return { ...processedRequests[0], forefront };
|
|
97
|
-
}
|
|
98
|
-
ow(requestLike, ow.object.partialShape({
|
|
99
|
-
url: ow.string,
|
|
100
|
-
id: ow.undefined,
|
|
101
|
-
}));
|
|
102
|
-
const request = requestLike instanceof Request ? requestLike : new Request(requestLike);
|
|
103
|
-
const cacheKey = getRequestId(request.uniqueKey);
|
|
104
|
-
const cachedInfo = this.requestCache.get(cacheKey);
|
|
105
|
-
if (cachedInfo) {
|
|
106
|
-
request.id = cachedInfo.id;
|
|
107
|
-
return {
|
|
108
|
-
wasAlreadyPresent: true,
|
|
109
|
-
// We may assume that if request is in local cache then also the information if the
|
|
110
|
-
// request was already handled is there because just one client should be using one queue.
|
|
111
|
-
wasAlreadyHandled: cachedInfo.isHandled,
|
|
112
|
-
requestId: cachedInfo.id,
|
|
113
|
-
uniqueKey: cachedInfo.uniqueKey,
|
|
114
|
-
forefront,
|
|
115
|
-
};
|
|
116
|
-
}
|
|
117
|
-
const queueOperationInfo = {
|
|
118
|
-
...(await this.client.addRequest(request, { forefront })),
|
|
119
|
-
uniqueKey: request.uniqueKey,
|
|
120
|
-
forefront,
|
|
121
|
-
};
|
|
122
|
-
const { requestId, wasAlreadyPresent } = queueOperationInfo;
|
|
123
|
-
this._cacheRequest(cacheKey, queueOperationInfo);
|
|
124
|
-
if (!wasAlreadyPresent && !this.recentlyHandledRequestsCache.get(requestId)) {
|
|
125
|
-
this.assumedTotalCount++;
|
|
126
|
-
// Performance optimization: add request straight to head if possible
|
|
127
|
-
this._maybeAddRequestToQueueHead(requestId, forefront);
|
|
128
|
-
}
|
|
129
|
-
return queueOperationInfo;
|
|
130
|
-
}
|
|
131
|
-
/**
|
|
132
|
-
* Adds requests to the queue in batches of 25. This method will wait till all the requests are added
|
|
133
|
-
* to the queue before resolving. You should prefer using `queue.addRequestsBatched()` or `crawler.addRequests()`
|
|
134
|
-
* if you don't want to block the processing, as those methods will only wait for the initial 1000 requests,
|
|
135
|
-
* start processing right after that happens, and continue adding more in the background.
|
|
136
|
-
*
|
|
137
|
-
* If a request passed in is already present due to its `uniqueKey` property being the same,
|
|
138
|
-
* it will not be updated. You can find out whether this happened by finding the request in the resulting
|
|
139
|
-
* {@link BatchAddRequestsResult} object.
|
|
140
|
-
*
|
|
141
|
-
* @param requestsLike {@link Request} objects or vanilla objects with request data.
|
|
142
|
-
* Note that the function sets the `uniqueKey` and `id` fields to the passed requests if missing.
|
|
143
|
-
* @param [options] Request queue operation options.
|
|
144
|
-
*/
|
|
145
|
-
async addRequests(requestsLike, options = {}) {
|
|
146
|
-
checkStorageAccess();
|
|
147
|
-
this.lastActivity = new Date();
|
|
148
|
-
ow(requestsLike, ow.object
|
|
149
|
-
.is((value) => isIterable(value) || isAsyncIterable(value))
|
|
150
|
-
.message((value) => `Expected an iterable or async iterable, got ${getObjectType(value)}`));
|
|
151
|
-
ow(options, ow.object.exactShape({
|
|
152
|
-
forefront: ow.optional.boolean,
|
|
153
|
-
cache: ow.optional.boolean,
|
|
154
|
-
}));
|
|
155
|
-
const { forefront = false, cache = true } = options;
|
|
156
|
-
const uniqueKeyToCacheKey = new Map();
|
|
157
|
-
const getCachedRequestId = (uniqueKey) => {
|
|
158
|
-
const cached = uniqueKeyToCacheKey.get(uniqueKey);
|
|
159
|
-
if (cached)
|
|
160
|
-
return cached;
|
|
161
|
-
const newCacheKey = getRequestId(uniqueKey);
|
|
162
|
-
uniqueKeyToCacheKey.set(uniqueKey, newCacheKey);
|
|
163
|
-
return newCacheKey;
|
|
164
|
-
};
|
|
165
|
-
const results = {
|
|
166
|
-
processedRequests: [],
|
|
167
|
-
unprocessedRequests: [],
|
|
168
|
-
};
|
|
169
|
-
const requests = [];
|
|
170
|
-
for await (const requestLike of requestsLike) {
|
|
171
|
-
if (typeof requestLike === 'string') {
|
|
172
|
-
requests.push(new Request({ url: requestLike }));
|
|
173
|
-
}
|
|
174
|
-
else if ('requestsFromUrl' in requestLike) {
|
|
175
|
-
const fetchedRequests = await this._fetchRequestsFromUrl(requestLike);
|
|
176
|
-
await this._addFetchedRequests(requestLike, fetchedRequests, options);
|
|
177
|
-
}
|
|
178
|
-
else {
|
|
179
|
-
requests.push(requestLike instanceof Request ? requestLike : new Request(requestLike));
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
const requestsToAdd = new Map();
|
|
183
|
-
for (const request of requests) {
|
|
184
|
-
const cacheKey = getCachedRequestId(request.uniqueKey);
|
|
185
|
-
const cachedInfo = this.requestCache.get(cacheKey);
|
|
186
|
-
if (cachedInfo) {
|
|
187
|
-
request.id = cachedInfo.id;
|
|
188
|
-
results.processedRequests.push({
|
|
189
|
-
wasAlreadyPresent: true,
|
|
190
|
-
// We may assume that if request is in local cache then also the information if the
|
|
191
|
-
// request was already handled is there because just one client should be using one queue.
|
|
192
|
-
wasAlreadyHandled: cachedInfo.isHandled,
|
|
193
|
-
requestId: cachedInfo.id,
|
|
194
|
-
uniqueKey: cachedInfo.uniqueKey,
|
|
195
|
-
});
|
|
196
|
-
}
|
|
197
|
-
else if (!requestsToAdd.has(request.uniqueKey)) {
|
|
198
|
-
requestsToAdd.set(request.uniqueKey, request);
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
// Early exit if all provided requests were already added
|
|
202
|
-
if (!requestsToAdd.size) {
|
|
203
|
-
return results;
|
|
204
|
-
}
|
|
205
|
-
const apiResults = await this.client.batchAddRequests([...requestsToAdd.values()], { forefront });
|
|
206
|
-
// Report unprocessed requests
|
|
207
|
-
results.unprocessedRequests = apiResults.unprocessedRequests;
|
|
208
|
-
// Add all new requests to the requestCache
|
|
209
|
-
for (const newRequest of apiResults.processedRequests) {
|
|
210
|
-
// Add the new request to the processed list
|
|
211
|
-
results.processedRequests.push(newRequest);
|
|
212
|
-
const cacheKey = getCachedRequestId(newRequest.uniqueKey);
|
|
213
|
-
const { requestId, wasAlreadyPresent } = newRequest;
|
|
214
|
-
if (cache) {
|
|
215
|
-
this._cacheRequest(cacheKey, { ...newRequest, forefront });
|
|
216
|
-
}
|
|
217
|
-
if (!wasAlreadyPresent && !this.recentlyHandledRequestsCache.get(requestId)) {
|
|
218
|
-
this.assumedTotalCount++;
|
|
219
|
-
// Performance optimization: add request straight to head if possible
|
|
220
|
-
this._maybeAddRequestToQueueHead(requestId, forefront);
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
return results;
|
|
224
|
-
}
|
|
225
|
-
/**
|
|
226
|
-
* Adds requests to the queue in batches. By default, it will resolve after the initial batch is added, and continue
|
|
227
|
-
* adding the rest in the background. You can configure the batch size via `batchSize` option and the sleep time in between
|
|
228
|
-
* the batches via `waitBetweenBatchesMillis`. If you want to wait for all batches to be added to the queue, you can use
|
|
229
|
-
* the `waitForAllRequestsToBeAdded` promise you get in the response object.
|
|
230
|
-
*
|
|
231
|
-
* @param requests The requests to add
|
|
232
|
-
* @param options Options for the request queue
|
|
233
|
-
*/
|
|
234
|
-
async addRequestsBatched(requests, options = {}) {
|
|
235
|
-
checkStorageAccess();
|
|
236
|
-
this.lastActivity = new Date();
|
|
237
|
-
ow(requests, ow.object
|
|
238
|
-
.is((value) => isIterable(value) || isAsyncIterable(value))
|
|
239
|
-
.message((value) => `Expected an iterable or async iterable, got ${getObjectType(value)}`));
|
|
240
|
-
ow(options, ow.object.exactShape({
|
|
241
|
-
forefront: ow.optional.boolean,
|
|
242
|
-
waitForAllRequestsToBeAdded: ow.optional.boolean,
|
|
243
|
-
batchSize: ow.optional.number,
|
|
244
|
-
waitBetweenBatchesMillis: ow.optional.number,
|
|
245
|
-
}));
|
|
246
|
-
const addRequest = this.addRequest.bind(this);
|
|
247
|
-
async function* generateRequests() {
|
|
248
|
-
for await (const opts of requests) {
|
|
249
|
-
// Validate the input
|
|
250
|
-
if (typeof opts === 'object' && opts !== null) {
|
|
251
|
-
if (opts.url !== undefined && typeof opts.url !== 'string') {
|
|
252
|
-
throw new Error(`Request options are not valid, the 'url' property is not a string. Input: ${inspect(opts)}`);
|
|
253
|
-
}
|
|
254
|
-
if (opts.id !== undefined) {
|
|
255
|
-
throw new Error(`Request options are not valid, the 'id' property must not be present. Input: ${inspect(opts)}`);
|
|
256
|
-
}
|
|
257
|
-
if (opts.requestsFromUrl !== undefined &&
|
|
258
|
-
typeof opts.requestsFromUrl !== 'string') {
|
|
259
|
-
throw new Error(`Request options are not valid, the 'requestsFromUrl' property is not a string. Input: ${inspect(opts)}`);
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
if (opts && typeof opts === 'object' && 'requestsFromUrl' in opts) {
|
|
263
|
-
// Handle URL lists right away
|
|
264
|
-
await addRequest(opts, { forefront: options.forefront });
|
|
265
|
-
}
|
|
266
|
-
else {
|
|
267
|
-
// Yield valid requests
|
|
268
|
-
yield typeof opts === 'string' ? { url: opts } : opts;
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
const { batchSize = 1000, waitBetweenBatchesMillis = 1000 } = options;
|
|
273
|
-
const chunks = peekableAsyncIterable(chunkedAsyncIterable(generateRequests(), batchSize));
|
|
274
|
-
const chunksIterator = chunks[Symbol.asyncIterator]();
|
|
275
|
-
const attemptToAddToQueueAndAddAnyUnprocessed = async (providedRequests, cache = true) => {
|
|
276
|
-
const resultsToReturn = [];
|
|
277
|
-
const apiResult = await this.addRequests(providedRequests, { forefront: options.forefront, cache });
|
|
278
|
-
resultsToReturn.push(...apiResult.processedRequests);
|
|
279
|
-
if (apiResult.unprocessedRequests.length) {
|
|
280
|
-
await sleep(waitBetweenBatchesMillis);
|
|
281
|
-
resultsToReturn.push(...(await attemptToAddToQueueAndAddAnyUnprocessed(providedRequests.filter((r) => !apiResult.processedRequests.some((pr) => pr.uniqueKey === r.uniqueKey)), false)));
|
|
282
|
-
}
|
|
283
|
-
return resultsToReturn;
|
|
284
|
-
};
|
|
285
|
-
// Add initial batch of `batchSize` to process them right away
|
|
286
|
-
const initialChunk = await chunksIterator.peek();
|
|
287
|
-
if (initialChunk === undefined) {
|
|
288
|
-
return { addedRequests: [], waitForAllRequestsToBeAdded: Promise.resolve([]) };
|
|
289
|
-
}
|
|
290
|
-
const addedRequests = await attemptToAddToQueueAndAddAnyUnprocessed(initialChunk);
|
|
291
|
-
await chunksIterator.next();
|
|
292
|
-
// If we have no more requests to add, return immediately
|
|
293
|
-
if ((await chunksIterator.peek()) === undefined) {
|
|
294
|
-
return {
|
|
295
|
-
addedRequests,
|
|
296
|
-
waitForAllRequestsToBeAdded: Promise.resolve([]),
|
|
297
|
-
};
|
|
298
|
-
}
|
|
299
|
-
// eslint-disable-next-line no-async-promise-executor
|
|
300
|
-
const promise = new Promise(async (resolve) => {
|
|
301
|
-
const finalAddedRequests = [];
|
|
302
|
-
for await (const requestChunk of chunks) {
|
|
303
|
-
finalAddedRequests.push(...(await attemptToAddToQueueAndAddAnyUnprocessed(requestChunk, false)));
|
|
304
|
-
await sleep(waitBetweenBatchesMillis);
|
|
305
|
-
}
|
|
306
|
-
resolve(finalAddedRequests);
|
|
307
|
-
});
|
|
308
|
-
this.inProgressRequestBatchCount += 1;
|
|
309
|
-
void promise.finally(() => {
|
|
310
|
-
this.inProgressRequestBatchCount -= 1;
|
|
311
|
-
});
|
|
312
|
-
// If the user wants to wait for all the requests to be added, we wait for the promise to resolve for them
|
|
313
|
-
if (options.waitForAllRequestsToBeAdded) {
|
|
314
|
-
addedRequests.push(...(await promise));
|
|
315
|
-
}
|
|
316
|
-
return {
|
|
317
|
-
addedRequests,
|
|
318
|
-
waitForAllRequestsToBeAdded: promise,
|
|
319
|
-
};
|
|
320
|
-
}
|
|
321
|
-
/**
|
|
322
|
-
* Gets the request from the queue specified by ID.
|
|
323
|
-
*
|
|
324
|
-
* @param id ID of the request.
|
|
325
|
-
* @returns Returns the request object, or `null` if it was not found.
|
|
326
|
-
*/
|
|
327
|
-
async getRequest(id) {
|
|
328
|
-
checkStorageAccess();
|
|
329
|
-
ow(id, ow.string);
|
|
330
|
-
const requestOptions = await this.client.getRequest(id);
|
|
331
|
-
if (!requestOptions)
|
|
332
|
-
return null;
|
|
333
|
-
return new Request(requestOptions);
|
|
334
|
-
}
|
|
335
|
-
/**
|
|
336
|
-
* Marks a request that was previously returned by the
|
|
337
|
-
* {@link RequestQueue.fetchNextRequest}
|
|
338
|
-
* function as handled after successful processing.
|
|
339
|
-
* Handled requests will never again be returned by the `fetchNextRequest` function.
|
|
340
|
-
*/
|
|
341
|
-
async markRequestHandled(request) {
|
|
342
|
-
checkStorageAccess();
|
|
343
|
-
this.lastActivity = new Date();
|
|
344
|
-
ow(request, ow.object.partialShape({
|
|
345
|
-
id: ow.string,
|
|
346
|
-
uniqueKey: ow.string,
|
|
347
|
-
handledAt: ow.optional.string,
|
|
348
|
-
}));
|
|
349
|
-
const forefront = this.requestCache.get(getRequestId(request.uniqueKey))?.forefront ?? false;
|
|
350
|
-
const handledAt = request.handledAt ?? new Date().toISOString();
|
|
351
|
-
const queueOperationInfo = {
|
|
352
|
-
...(await this.client.updateRequest({
|
|
353
|
-
...request,
|
|
354
|
-
handledAt,
|
|
355
|
-
})),
|
|
356
|
-
uniqueKey: request.uniqueKey,
|
|
357
|
-
forefront,
|
|
358
|
-
};
|
|
359
|
-
request.handledAt = handledAt;
|
|
360
|
-
this.recentlyHandledRequestsCache.add(request.id, true);
|
|
361
|
-
if (!queueOperationInfo.wasAlreadyHandled) {
|
|
362
|
-
this.assumedHandledCount++;
|
|
363
|
-
}
|
|
364
|
-
this.queueHeadIds.remove(request.id);
|
|
365
|
-
this._cacheRequest(getRequestId(request.uniqueKey), queueOperationInfo);
|
|
366
|
-
return queueOperationInfo;
|
|
367
|
-
}
|
|
368
|
-
/**
|
|
369
|
-
* Reclaims a failed request back to the queue, so that it can be returned for processing later again
|
|
370
|
-
* by another call to {@link RequestQueue.fetchNextRequest}.
|
|
371
|
-
* The request record in the queue is updated using the provided `request` parameter.
|
|
372
|
-
* For example, this lets you store the number of retries or error messages for the request.
|
|
373
|
-
*/
|
|
374
|
-
async reclaimRequest(request, options = {}) {
|
|
375
|
-
checkStorageAccess();
|
|
376
|
-
this.lastActivity = new Date();
|
|
377
|
-
ow(request, ow.object.partialShape({
|
|
378
|
-
id: ow.string,
|
|
379
|
-
uniqueKey: ow.string,
|
|
380
|
-
}));
|
|
381
|
-
ow(options, ow.object.exactShape({
|
|
382
|
-
forefront: ow.optional.boolean,
|
|
383
|
-
}));
|
|
384
|
-
const { forefront = false } = options;
|
|
385
|
-
// TODO: If request hasn't been changed since the last getRequest(),
|
|
386
|
-
// we don't need to call updateRequest() and thus improve performance.
|
|
387
|
-
const queueOperationInfo = {
|
|
388
|
-
...(await this.client.updateRequest(request, {
|
|
389
|
-
forefront,
|
|
390
|
-
})),
|
|
391
|
-
uniqueKey: request.uniqueKey,
|
|
392
|
-
forefront,
|
|
393
|
-
};
|
|
394
|
-
this._cacheRequest(getRequestId(request.uniqueKey), queueOperationInfo);
|
|
395
|
-
return queueOperationInfo;
|
|
396
|
-
}
|
|
397
|
-
/**
|
|
398
|
-
* Resolves to `true` if the next call to {@link RequestQueue.fetchNextRequest}
|
|
399
|
-
* would return `null`, otherwise it resolves to `false`.
|
|
400
|
-
* Note that even if the queue is empty, there might be some pending requests currently being processed.
|
|
401
|
-
* If you need to ensure that there is no activity in the queue, use {@link RequestQueue.isFinished}.
|
|
402
|
-
*/
|
|
403
|
-
async isEmpty() {
|
|
404
|
-
await this.ensureHeadIsNonEmpty();
|
|
405
|
-
return this.queueHeadIds.length() === 0;
|
|
406
|
-
}
|
|
407
|
-
_reset() {
|
|
408
|
-
this.lastActivity = new Date();
|
|
409
|
-
this.queueHeadIds.clear();
|
|
410
|
-
this.recentlyHandledRequestsCache.clear();
|
|
411
|
-
this.assumedTotalCount = 0;
|
|
412
|
-
this.assumedHandledCount = 0;
|
|
413
|
-
this.requestCache.clear();
|
|
414
|
-
}
|
|
415
|
-
/**
|
|
416
|
-
* Caches information about request to beware of unneeded addRequest() calls.
|
|
417
|
-
*/
|
|
418
|
-
_cacheRequest(cacheKey, queueOperationInfo) {
|
|
419
|
-
// Remove the previous entry, as otherwise our cache will never update 👀
|
|
420
|
-
this.requestCache.remove(cacheKey);
|
|
421
|
-
this.requestCache.add(cacheKey, {
|
|
422
|
-
id: queueOperationInfo.requestId,
|
|
423
|
-
isHandled: queueOperationInfo.wasAlreadyHandled,
|
|
424
|
-
uniqueKey: queueOperationInfo.uniqueKey,
|
|
425
|
-
hydrated: null,
|
|
426
|
-
lockExpiresAt: null,
|
|
427
|
-
forefront: queueOperationInfo.forefront,
|
|
428
|
-
});
|
|
429
|
-
}
|
|
430
|
-
/**
|
|
431
|
-
* Adds a request straight to the queueHeadDict, to improve performance.
|
|
432
|
-
*/
|
|
433
|
-
_maybeAddRequestToQueueHead(requestId, forefront) {
|
|
434
|
-
if (forefront) {
|
|
435
|
-
this.queueHeadIds.add(requestId, requestId, true);
|
|
436
|
-
}
|
|
437
|
-
else if (this.assumedTotalCount < QUERY_HEAD_MIN_LENGTH) {
|
|
438
|
-
this.queueHeadIds.add(requestId, requestId, false);
|
|
439
|
-
}
|
|
440
|
-
}
|
|
441
|
-
/**
|
|
442
|
-
* Removes the queue either from the Apify Cloud storage or from the local database,
|
|
443
|
-
* depending on the mode of operation.
|
|
444
|
-
*/
|
|
445
|
-
async drop() {
|
|
446
|
-
checkStorageAccess();
|
|
447
|
-
await this.client.drop();
|
|
448
|
-
serviceLocator.getStorageInstanceManager().removeFromCache(this);
|
|
449
|
-
}
|
|
450
|
-
/**
|
|
451
|
-
* Remove all requests from the queue but keep the queue itself, resetting it
|
|
452
|
-
* so it can be reused (e.g. across multiple `crawler.run()` calls).
|
|
453
|
-
*/
|
|
454
|
-
async purge() {
|
|
455
|
-
checkStorageAccess();
|
|
456
|
-
await this.client.purge();
|
|
457
|
-
// Reset in-memory bookkeeping so the queue behaves as if freshly opened.
|
|
458
|
-
this.assumedTotalCount = 0;
|
|
459
|
-
this.assumedHandledCount = 0;
|
|
460
|
-
this.queueHeadIds.clear();
|
|
461
|
-
this.requestCache.clear();
|
|
462
|
-
this.recentlyHandledRequestsCache.clear();
|
|
463
|
-
this.lastActivity = new Date();
|
|
464
|
-
this.isFinishedCalledWhileHeadWasNotEmpty = 0;
|
|
465
|
-
this.inProgressRequestBatchCount = 0;
|
|
466
|
-
}
|
|
467
|
-
/**
|
|
468
|
-
* @inheritdoc
|
|
469
|
-
*/
|
|
470
|
-
async *[Symbol.asyncIterator]() {
|
|
471
|
-
while (true) {
|
|
472
|
-
const req = await this.fetchNextRequest();
|
|
473
|
-
if (!req)
|
|
474
|
-
break;
|
|
475
|
-
yield req;
|
|
476
|
-
}
|
|
477
|
-
}
|
|
478
|
-
/**
|
|
479
|
-
* Returns the number of handled requests.
|
|
480
|
-
*
|
|
481
|
-
* This function is just a convenient shortcut for:
|
|
482
|
-
*
|
|
483
|
-
* ```javascript
|
|
484
|
-
* const { handledRequestCount } = await queue.getInfo();
|
|
485
|
-
* ```
|
|
486
|
-
* @inheritdoc
|
|
487
|
-
*/
|
|
488
|
-
async getHandledCount() {
|
|
489
|
-
// NOTE: We keep this function for compatibility with RequestList.getHandledCount()
|
|
490
|
-
const { handledRequestCount } = await this.getInfo();
|
|
491
|
-
return handledRequestCount;
|
|
492
|
-
}
|
|
493
|
-
/**
|
|
494
|
-
* Returns an object containing general information about the request queue.
|
|
495
|
-
*
|
|
496
|
-
* **Example:**
|
|
497
|
-
* ```
|
|
498
|
-
* {
|
|
499
|
-
* id: "WkzbQMuFYuamGv3YF",
|
|
500
|
-
* name: "my-queue",
|
|
501
|
-
* createdAt: new Date("2015-12-12T07:34:14.202Z"),
|
|
502
|
-
* modifiedAt: new Date("2015-12-13T08:36:13.202Z"),
|
|
503
|
-
* accessedAt: new Date("2015-12-14T08:36:13.202Z"),
|
|
504
|
-
* totalRequestCount: 25,
|
|
505
|
-
* handledRequestCount: 5,
|
|
506
|
-
* pendingRequestCount: 20,
|
|
507
|
-
* }
|
|
508
|
-
* ```
|
|
509
|
-
*
|
|
510
|
-
* @throws If the underlying storage no longer exists (e.g. it was deleted externally).
|
|
511
|
-
*/
|
|
512
|
-
async getInfo() {
|
|
513
|
-
checkStorageAccess();
|
|
514
|
-
return this.client.getMetadata();
|
|
515
|
-
}
|
|
516
|
-
/**
|
|
517
|
-
* Fetches URLs from requestsFromUrl and returns them in format of list of requests
|
|
518
|
-
*/
|
|
519
|
-
async _fetchRequestsFromUrl(source) {
|
|
520
|
-
const { requestsFromUrl, regex, ...sharedOpts } = source;
|
|
521
|
-
// Download remote resource and parse URLs.
|
|
522
|
-
let urlsArr;
|
|
523
|
-
try {
|
|
524
|
-
urlsArr = await this._downloadListOfUrls({
|
|
525
|
-
url: requestsFromUrl,
|
|
526
|
-
urlRegExp: regex,
|
|
527
|
-
proxyUrl: await this.proxyConfiguration?.newUrl(),
|
|
528
|
-
});
|
|
529
|
-
}
|
|
530
|
-
catch (err) {
|
|
531
|
-
throw new Error(`Cannot fetch a request list from ${requestsFromUrl}: ${err}`);
|
|
532
|
-
}
|
|
533
|
-
// Skip if resource contained no URLs.
|
|
534
|
-
if (!urlsArr.length) {
|
|
535
|
-
this.log.warning('The fetched list contains no valid URLs.', { requestsFromUrl, regex });
|
|
536
|
-
return [];
|
|
537
|
-
}
|
|
538
|
-
return urlsArr.map((url) => ({ url, ...sharedOpts }));
|
|
539
|
-
}
|
|
540
|
-
/**
|
|
541
|
-
* Adds all fetched requests from a URL from a remote resource.
|
|
542
|
-
*/
|
|
543
|
-
async _addFetchedRequests(source, fetchedRequests, options) {
|
|
544
|
-
const { requestsFromUrl, regex } = source;
|
|
545
|
-
const { addedRequests } = await this.addRequestsBatched(fetchedRequests, options);
|
|
546
|
-
this.log.info('Fetched and loaded Requests from a remote resource.', {
|
|
547
|
-
requestsFromUrl,
|
|
548
|
-
regex,
|
|
549
|
-
fetchedCount: fetchedRequests.length,
|
|
550
|
-
importedCount: addedRequests.length,
|
|
551
|
-
duplicateCount: fetchedRequests.length - addedRequests.length,
|
|
552
|
-
sample: JSON.stringify(fetchedRequests.slice(0, 5)),
|
|
553
|
-
});
|
|
554
|
-
return addedRequests;
|
|
555
|
-
}
|
|
556
|
-
/**
|
|
557
|
-
* @internal wraps public utility for mocking purposes
|
|
558
|
-
*/
|
|
559
|
-
async _downloadListOfUrls(options) {
|
|
560
|
-
return downloadListOfUrls({
|
|
561
|
-
...options,
|
|
562
|
-
httpClient: this.httpClient,
|
|
563
|
-
});
|
|
564
|
-
}
|
|
565
|
-
/**
|
|
566
|
-
* Opens a request queue and returns a promise resolving to an instance
|
|
567
|
-
* of the {@link RequestQueue} class.
|
|
568
|
-
*
|
|
569
|
-
* {@link RequestQueue} represents a queue of URLs to crawl, which is stored either on local filesystem or in the cloud.
|
|
570
|
-
* The queue is used for deep crawling of websites, where you start with several URLs and then
|
|
571
|
-
* recursively follow links to other pages. The data structure supports both breadth-first
|
|
572
|
-
* and depth-first crawling orders.
|
|
573
|
-
*
|
|
574
|
-
* For more details and code examples, see the {@link RequestQueue} class.
|
|
575
|
-
*
|
|
576
|
-
* @param [identifier]
|
|
577
|
-
* ID or name of the request queue to be opened. If a string is provided, it will first be
|
|
578
|
-
* looked up as an ID; if no such storage exists, it will be treated as a name.
|
|
579
|
-
* If `null` or `undefined`, the function returns the default request queue associated with the crawler run.
|
|
580
|
-
* @param [options] Open Request Queue options.
|
|
581
|
-
*/
|
|
582
|
-
static async open(identifier, options = {}) {
|
|
583
|
-
checkStorageAccess();
|
|
584
|
-
ow(options, ow.object.exactShape({
|
|
585
|
-
config: ow.optional.object.instanceOf(Configuration),
|
|
586
|
-
storageClient: ow.optional.object,
|
|
587
|
-
proxyConfiguration: ow.optional.object,
|
|
588
|
-
httpClient: ow.optional.object,
|
|
589
|
-
}));
|
|
590
|
-
const client = options.storageClient ?? serviceLocator.getStorageClient();
|
|
591
|
-
const config = options.config ?? serviceLocator.getConfiguration();
|
|
592
|
-
await purgeDefaultStorages({ onlyPurgeOnce: true, client, config });
|
|
593
|
-
const resolved = await resolveStorageIdentifier(identifier, client, 'RequestQueue');
|
|
594
|
-
const queue = await serviceLocator
|
|
595
|
-
.getStorageInstanceManager()
|
|
596
|
-
.openStorage(this, {
|
|
597
|
-
...resolved,
|
|
598
|
-
clientOpener: () => client.createRequestQueueClient(resolved),
|
|
599
|
-
clientCacheKey: client.getStorageClientCacheKey?.() ?? client.constructor.name,
|
|
600
|
-
});
|
|
601
|
-
queue.proxyConfiguration = options.proxyConfiguration;
|
|
602
|
-
queue.httpClient = options.httpClient;
|
|
603
|
-
if (!queue.isInitialized) {
|
|
604
|
-
// Re-create the request queue client with clientKey and timeoutSecs so that
|
|
605
|
-
// request locking works correctly for API-backed implementations.
|
|
606
|
-
// TODO: clientKey/timeoutSecs are Apify-platform concerns and should eventually be pushed
|
|
607
|
-
// down into the Apify SDK's client implementation, aligning with crawlee-python's approach
|
|
608
|
-
// where locking is handled internally by the client (see crawlee-python PR #1194).
|
|
609
|
-
queue.client = await client.createRequestQueueClient({
|
|
610
|
-
id: queue.id,
|
|
611
|
-
clientKey: queue.clientKey,
|
|
612
|
-
timeoutSecs: queue.timeoutSecs,
|
|
613
|
-
});
|
|
614
|
-
queue.isInitialized = true;
|
|
615
|
-
}
|
|
616
|
-
return queue;
|
|
617
|
-
}
|
|
618
|
-
}
|
|
619
|
-
//# sourceMappingURL=request_provider.js.map
|
|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