Skip to content

Conversation

@justin-thurman
Copy link

Some of our Marketo API calls hang for 30+ minutes, blocking an entire Celery queue while they do so. By default, the requests library does not implement any timeout. You have to pass a timeout argument to requests calls (see docs). Unfortunately, the marketo library doesn't provide any method of passing arguments down to individual requests calls, so we need to implement that ourselves.

Usage is as follows:

client = MarketoClient(..., requests_timeout=<int>)

The requests_timeout parameter must be an integer. It will be passed to all requests.<method> calls used in the library. Defaults to None, i.e., no timeout.

@justin-thurman justin-thurman changed the title Pass a timeout argument to requests calls [SGP-24215] Pass a timeout argument to requests calls Mar 2, 2022
Copy link

@ChrisAikman ChrisAikman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thank you! :shipit:

@justin-thurman justin-thurman merged commit 1711aa4 into master Mar 2, 2022
@justin-thurman justin-thurman deleted the SGP-24215-timeout branch March 3, 2022 00:11
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 this pull request may close these issues.

3 participants