File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -515,7 +515,7 @@ const requestQueueClient = client.requestQueue(requestQueue.id, {
515515// Get all requests from the queue and check one locked by the first Actor.
516516const requests = await requestQueueClient.listRequests();
517517const requestsLockedByAnotherRun = requests.items.filter((request) => request.lockByClient === 'requestqueueone');
518- const requestLockedByAnotherRun = await requestQueueClient.getRequest(
518+ const requestLockedByAnotherRunDetail = await requestQueueClient.getRequest(
519519 requestsLockedByAnotherRun[0].id,
520520);
521521
@@ -527,16 +527,16 @@ const processingRequestsClientTwo = await requestQueueClient.listAndLockHead(
527527 },
528528);
529529const wasBothRunsLockedSameRequest = !!processingRequestsClientTwo.items.find(
530- (request) => request.id === requestLockedByAnotherRun .id,
530+ (request) => request.id === requestLockedByAnotherRunDetail .id,
531531);
532532
533533console.log(` Was the request locked by the first run locked by the second run? ${wasBothRunsLockedSameRequest}` );
534- console.log(` Request locked until ${requestLockedByAnotherRun ? .lockExpiresAt }` );
534+ console.log(` Request locked until ${requestLockedByAnotherRunDetail ? .lockExpiresAt }` );
535535
536536// Other clients cannot modify the lock; attempting to do so will throw an error.
537537try {
538538 await requestQueueClient.prolongRequestLock(
539- requestLockedByAnotherRun .id,
539+ requestLockedByAnotherRunDetail .id,
540540 { lockSecs: 60 },
541541 );
542542} catch (err) {
You can’t perform that action at this time.
0 commit comments