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

Delivery and Management API specific options #135

Conversation

@klevo
Copy link
Contributor

klevo commented Oct 3, 2019

This is to allow to pass different configuration values of the same option to Delivery and Management clients.

It's needed if we want to say configure the Delivery API to fail quickly as we don't want to hog page rendering, and on the other hand let Management API take as long as needed in the same app, as those queries are not run by visitors and don't have to be fast.

config.options = {
    # Optional:
    # Use `delivery_api` and `management_api` keys to limit to what API the settings
    # will apply. Useful because Delivery API is usually visitor facing, while Management
    # is used in background tasks that can run much longer. For example:
    delivery_api: {
      timeout_read: 6
    },
    management_api: {
      timeout_read: 100
    }
}

Also in this PR webmock was updated to latest version, because the previous version was causing VCR fails when running test suite locally or on Travis. This bug: https://www.bountysource.com/issues/54892151-twitter-gem-vcr-request-initialized-with-an-invalid-body

klevo added 8 commits Oct 3, 2019
This is to allow to pass different configuration values of the same option to Delivery and Management clients.

It's needed if we want to say configure the Delivery API to fail quickly as we don't want to hog page rendering, and on the other hand let Management API take as long as needed in the same app, as those queries are not run by visitors and don't have to be fast.

```
config.options = {
    # Optional:
    # Use `delivery_api` and `management_api` keys to limit to what API the settings
    # will apply. Useful because Delivery API is usually visitor facing, while Management
    # is used in background tasks that can run much longer. For example:
    delivery_api: {
      timeout_read: 6
    },
    management_api: {
      timeout_read: 100
    }
}
```
This reverts commit 7ebfa49.
@klevo

This comment has been minimized.

Copy link
Contributor Author

klevo commented Oct 10, 2019

The CI is finally green.

dlitvakb added 2 commits Oct 11, 2019
@dlitvakb dlitvakb merged commit bc82e18 into contentful:master Oct 11, 2019
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.