-
Notifications
You must be signed in to change notification settings - Fork 136
feat: API: request queue unlocking docs #1591
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
9c82b44
e40452f
e97cd8d
2088cab
4658525
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -581,6 +581,8 @@ paths: | |
| $ref: 'paths/request-queues/request-queues@{queueId}.yaml' | ||
| '/v2/request-queues/{queueId}/requests/batch': | ||
| $ref: 'paths/request-queues/request-queues@{queueId}@[email protected]' | ||
| '/v2/request-queues/{queueId}/requests/unlock': | ||
| $ref: 'paths/request-queues/request-queues@{queueId}@[email protected]' | ||
| '/v2/request-queues/{queueId}/requests': | ||
| $ref: 'paths/request-queues/request-queues@{queueId}@requests.yaml' | ||
| '/v2/request-queues/{queueId}/requests/{requestId}': | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
| @@ -0,0 +1,55 @@ | ||||
| post: | ||||
| tags: | ||||
| - Storage/Request queues/Requests locks | ||||
| summary: Unlock requests | ||||
| description: | | ||||
| Unlocks requests in the queue for the client. The requests are unlocked if were locked by the same client key or if locked from the same Actor run. | ||||
| operationId: requestQueue_requests_unlock_post | ||||
| parameters: | ||||
| - name: queueId | ||||
| in: path | ||||
| description: Queue ID or `username~queue-name`. | ||||
| required: true | ||||
| style: simple | ||||
| schema: | ||||
| type: string | ||||
| example: WkzbQMuFYuamGv3YF | ||||
| - name: clientKey | ||||
| in: query | ||||
| description: | | ||||
| A unique identifier of the client accessing the request queue. It must | ||||
| be a string between 1 and 32 characters long | ||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd use
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here, let's move this in separate PR as I need to update it everywhere 😄
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay, are you up to it or shall I make an issue? 🙂 |
||||
| style: form | ||||
| explode: true | ||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Um, it's just a simple string query parameter, why
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Honestly not sure, I just reused this param from the current rq endpoint see apify-docs/apify-api/openapi/paths/request-queues/request-queues@{queueId}@[email protected] Line 153 in d676859
|
||||
| schema: | ||||
| type: string | ||||
| example: client-abc | ||||
| responses: | ||||
| '200': | ||||
| description: 'Number of requests that were unlocked' | ||||
| content: | ||||
| application/json: | ||||
| schema: | ||||
| type: object | ||||
| required: | ||||
| - data | ||||
| properties: | ||||
| data: | ||||
| type: object | ||||
| required: | ||||
| - unlockedCount | ||||
| properties: | ||||
| unlockedCount: | ||||
| type: integer | ||||
| description: 'Number of requests that were successfully unlocked' | ||||
| example: | ||||
| data: | ||||
| unlockedCount: 10 | ||||
|
|
||||
| deprecated: false | ||||
| x-js-parent: RequestQueueClient | ||||
| x-js-name: unlockRequests | ||||
| x-js-doc-url: https://docs.apify.com/api/client/js/reference/class/RequestQueueClient#unlockRequests | ||||
| x-py-parent: RequestQueueClientAsync | ||||
| x-py-name: unlock_requests | ||||
| x-py-doc-url: https://docs.apify.com/api/client/python/reference/class/RequestQueueClientAsync#unlock_requests | ||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I understand what this actually does. Does it unlock all requests locked from the same run, and (in addition to) all requests locked by the same client key (I assume to account for working with the RQ from a script outside of the platform)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, if the client is within the Actor run it will unlock all request locked by this Actor run plus additionally all lock lock by the clientKey. If the client is outside if Actor run it will unlock just request locked by the same clientKey.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated the description.