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: Make it possible to config request timeout #97

Closed
hoangtuanictvn opened this issue Dec 16, 2020 · 2 comments · Fixed by #102
Closed

Feature request: Make it possible to config request timeout #97

hoangtuanictvn opened this issue Dec 16, 2020 · 2 comments · Fixed by #102

Comments

@hoangtuanictvn
Copy link
Contributor

Hello, I'm using your sendgrid-actionmailer gem now. And I make this request to hope that you can add the feature to pass the http_options like timeout from config of actionmailer to sendgrid-ruby to set the timeout for sendgrid API request as below.

config.action_mailer.sendgrid_actionmailer_settings = {
  api_options: {
    http_options: {
      open_timeout: x,
      write_timeout: x
      ...
    }
  }
  ...
}

I had read some issues of the sendgrid/ruby-http-client gem. In sendgrid/ruby-http-client#20 PR, http_options were added, so I hope it is possible to config in your gem.

@tyrauber
Copy link
Collaborator

Hello @hoangtuanictvn, sendgrid-actionmailer doesn't use sendgrid/ruby-http-client directly, but by way of sendgrid/sendgrid-ruby. As far as I can tell, sendgrid-ruby doesn't implement the http_options provided by sendgrid/ruby-http-client#20. For sendgrid-actionmailer to be able to implement this feature, sendgrid-ruby would need to utilize these options and expose them through it's configuration options, so that sendgrid-actionmailer could pass the options to ruby-http-client through sendgrid-ruby.

@hoangtuanictvn
Copy link
Contributor Author

hoangtuanictvn commented Dec 16, 2020

@tyrauber
Sorry for my mistake.
And thank you to figure out to me its problem. I had been opened an issue at there sendgrid/sendgrid-ruby/issues/449. I hope that it can be added as soon as possible. Could I notice to you again when that issue was solved?

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

Successfully merging a pull request may close this issue.

2 participants