Skip to content
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

Feature Request: Interruptible request batches #1246

Open
Nixill opened this issue Aug 10, 2024 · 5 comments
Open

Feature Request: Interruptible request batches #1246

Nixill opened this issue Aug 10, 2024 · 5 comments

Comments

@Nixill
Copy link

Nixill commented Aug 10, 2024

Feature Request Type

RPC Request

Feature Request Type (Other)

No response

Requested Feature

Three related things:

1. RequestStatus::Interrupted

Given a value of 208 or whatever's next in the 200s at the time of implementation, this request status is the returned status for unprocessed inner requests within a request batch. If haltOnError was true, then this is only returned for the first interrupted inner request; otherwise, it is returned for all unprocessed inner requests.

2. Request: InterruptRequestBatch

Interrupts a running request batch sent by the same client.

Cannot interrupt an inner request that is in the middle of being processed, unless that inner request is a Sleep request. If not, the next request to be processed (and all thereafter) will instead be skipped with an Interrupted request status.

Has the following three parameters.

Name Type Description Default
requestBatchId String The top-level ID of the request to interrupt N/A
?innerRequestId String The ID of the inner request before which execution should be halted The next inner request to be processed
?comment String String The comment that should be provided alongside RequestStatus::Interrupted

Some potential returned Request Status codes include:

  • 100 Success: The request batch was interrupted successfully.
  • 600 Resource Not Found:
    • No request batch with the given ID was made by the calling client.
    • An inner request with the given ID was not part of the request batch with the given ID.
  • 604 Invalid Resource State:
    • The request batch with the given ID was already completed, or is on its final inner request.
    • The inner request with the given ID was already processed.
    • The request batch with the given ID was submitted as RequestBatchExecutionType::Parallel.

3. Request batch parameter: interruptOnDisconnect

Placed directly in the d of a request batch message. Defaults to false, preserving current behavior. When true, if the client that sends this request batch disconnects in the middle of its execution, it is interrupted immediately.

Requested Feature Usage Scenario

It would be nice to be able to interrupt animations that I've started from the websocket client.

Edit

Made the headings within the "Requested Feature" heading a lower level than that heading itself.

@Nixill
Copy link
Author

Nixill commented Aug 10, 2024

... This would be especially useful when I accidentally send a 15 minute long batch request because I changed something 30 seconds long from 1fps to 30fps without cutting the sleep from 30 frames to 1 frame.

@Oceanity
Copy link

+1

2 similar comments
@dennisrijsdijk
Copy link

+1

@CKY-
Copy link

CKY- commented Aug 16, 2024

+1

@phroggster
Copy link

+2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants