Skip to content

Delivery and Management API specific options - #135

Merged
David Litvak Bruno (dlitvakb) merged 10 commits into
contentful:masterfrom
AscentSoftware:delivery-and-management-api-specific-options
Oct 11, 2019
Merged

Delivery and Management API specific options#135
David Litvak Bruno (dlitvakb) merged 10 commits into
contentful:masterfrom
AscentSoftware:delivery-and-management-api-specific-options

Conversation

@klevo

@klevo Robert Starsi (klevo) commented Oct 3, 2019

Copy link
Copy Markdown
Contributor

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

Robert Starsi (klevo) and others added 8 commits October 3, 2019 10:18
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
    }
}
```
@klevo

Copy link
Copy Markdown
Contributor Author

The CI is finally green.

@dlitvakb
David Litvak Bruno (dlitvakb) merged commit bc82e18 into contentful:master Oct 11, 2019
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.

2 participants