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

Dynamic service_timeout #213

Open
tessereth opened this issue Feb 27, 2024 · 2 comments
Open

Dynamic service_timeout #213

tessereth opened this issue Feb 27, 2024 · 2 comments

Comments

@tessereth
Copy link

For our rails app, we would like to be able to have a dynamic service_timeout based on the headers of the request. So I would love to be able to provide a lambda for service_timeout, something like:

service_timeout: -> (env) { custom_logic }

Is this something you would be interested in including? I'm happy to make a PR, I just wanted to check before I put in the work to write the code.

This could be a solution to both of these other issues as well:

@coreymartella
Copy link

Appears the fork https://github.com/jash-kothari-forks/rack-timeout has the exact behaviour you're looking for

Its 77 commits bit behind master here but wonder if we can get the PR open an into a mergable state.

@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.

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

3 participants