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: Request batch interrupting #1243

Closed
Nixill opened this issue Aug 5, 2024 · 1 comment
Closed

Feature Request: Request batch interrupting #1243

Nixill opened this issue Aug 5, 2024 · 1 comment

Comments

@Nixill
Copy link

Nixill commented Aug 5, 2024

Feature Request Type

RPC Request

Feature Request Type (Other)

No response

Requested Feature

This feature request takes three parts. (Note that I use the term "sub-request" to mean one single request out of a batch.)

1. Request status: RequestStatus::Interrupted

The status code for the response of an interrupted sub-request. Value would be in the 200s (currently 208).

2. Request type: InterruptRequestBatch

Interrupts a request batch previously sent by this client. The sub-request currently being processed will finish (unless it's a Sleep, in which case it will also be interrupted), and the next sub-request will fail with RequestStatus::Interrupted (as will all further sub-requests, if haltOnFailure was set to false).

Has the following parameters:

  • requestBatchId: The requestId sent as part of the original request batch that should now be cancelled.
  • ?afterSubRequestId: The requestId sent for the specific sub-request immediately before which the batch should be cancelled. If left empty, execution is halted immediately.

Doesn't return data, but may return the following request statuses:

  • 100 Success: The request batch was interrupted successfully.
  • 206 UnsupportedRequestBatchExecutionType: An attempt was made to Interrupt a RequestBatchExecutionType::Parallel request.
  • 600 ResourceNotFound:
    • No request batch with the given ID was made by this client.
    • No sub-request with the given ID was made within the given request batch.
  • 604 InvalidResourceState:
    • No request batch with the given ID was made by the client, but a request batch with the same ID was made by another client.
    • The request batch with the given ID has already completed (or the last sub-request has already started processing).
    • The sub-request with the given ID has already started (or finished) processing.

3. Option for batch requests: interruptOnDisconnect

This optional boolean is specified as part of the d of an original request batch. It defaults to false, which maintains current behavior, but on true it will immediately interrupt the request batch if the client that sent it disconnects during execution (the same as if an InterruptRequestBatch request had been used on it).

Requested Feature Usage Scenario

This would be useful for animations run through a websocket or other types of long request batch that involve sleeping.

@Nixill
Copy link
Author

Nixill commented Sep 23, 2024

Closing this because I'm an idiot that filed it twice. I blame ADHD. #1246 is the one that caught attention and stuff, so I'll keep that one open.

@Nixill Nixill closed this as not planned Won't fix, can't repro, duplicate, stale Sep 23, 2024
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

1 participant