Feat/sdk targeted list limits (list-limits part of issue #1107) - #18
Open
J-Nad wants to merge 3 commits into
Open
Feat/sdk targeted list limits (list-limits part of issue #1107)#18J-Nad wants to merge 3 commits into
J-Nad wants to merge 3 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds targeted list-limit updates to the Python SDK as the Python counterpart to the existing Node SDK changes.
Previously, changing a robot's limit through the SDK meant updating and resending the workflow. With this change, the SDK can send only the specific limit that needs to be updated.
What changed
Robot.set_list_limit()as the higher-level method for updating a robot's limit.scrapeList,crawl, andsearchactions.limitand determines itspairIndex,actionIndex, andargIndexautomatically.Client.update_list_limits()for sending one or more targeted limit updates directly.ListLimitUpdatetyping for the targeted update payload.Example:
Instead of resending the full workflow, the SDK sends only the targeted update:
{ "limits": [ { "pairIndex": 0, "actionIndex": 0, "argIndex": 0, "limit": 25 } ] }The backend can then update that specific value while leaving the rest of the workflow unchanged.
Related work
This is the Python SDK portion of the targeted list-limit work for
getmaxun/maxun#1107.Related PRs:
getmaxun/maxun#1176— adds support for targeted list-limit updates in the SDK route.getmaxun/node-sdk#34— adds the corresponding functionality to the Node SDK.