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

Request: timeout exempt requests #190

Closed
latortuga opened this issue Jun 14, 2022 · 1 comment
Closed

Request: timeout exempt requests #190

latortuga opened this issue Jun 14, 2022 · 1 comment

Comments

@latortuga
Copy link

Hi there, love the gem.

I have a system in place that allows me to push specific kinds of requests to a background job process which ultimately runs the request through my Rails app in the background. In those circumstances, I basically have a request that is going through my app, but it is not time-sensitive - the whole point of this setup is to push slow requests to a background job for processing. The frontend can show a spinner while it waits for the worker to finish the slow request and can give the user periodic updates about the progress.

I would like to exempt these "backgrounded" requests from timeouts. Currently, there doesn't seem to be a way to exempt anything from timeouts. If it happens in the app where the middleware is mounted, it is subject to timeout.

Any chance of something like this could get implemented? I'm envisioning something super basic like:

env["rack.timeout.exempt"] = true
@wuputah
Copy link
Collaborator

wuputah commented May 15, 2024

There's been many requests and several PRs over the years to be able to do this or something similar. The general conclusion has been this is an anti-pattern. The most vigorous debate took place in #110, which I welcome you to review.

I think if we can find a sustainable approach that allows people to customize the behavior, but does not endlessly add more options/option handling, then this might have a future. However, this might require significant refactoring.

In this case I am going to suggest merging any further discussion of this issue into #213. Thanks!

@wuputah wuputah closed this as not planned Won't fix, can't repro, duplicate, stale May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants