Skip to content

Commit

Permalink
feat: Propagate renewQuery option from API to orchestrator
Browse files Browse the repository at this point in the history
Fixes #112
  • Loading branch information
paveltiunov committed May 22, 2019
1 parent ca68cd3 commit 9c640ba
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/cubejs-api-gateway/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ const querySchema = Joi.object().keys({
order: Joi.object().pattern(id, Joi.valid('asc', 'desc')),
segments: Joi.array().items(id),
timezone: Joi.string(),
limit: Joi.number().integer().min(1).max(50000)
limit: Joi.number().integer().min(1).max(50000),
renewQuery: Joi.boolean()
});

const normalizeQuery = (query) => {
Expand Down Expand Up @@ -244,7 +245,11 @@ class ApiGateway {
const annotation = prepareAnnotation(metaConfig, normalizedQuery);
const aliasToMemberNameMap = prepareAliasToMemberNameMap(metaConfig, sqlQuery, normalizedQuery);
const toExecute = {
...sqlQuery, query: sqlQuery.sql[0], values: sqlQuery.sql[1], continueWait: true
...sqlQuery,
query: sqlQuery.sql[0],
values: sqlQuery.sql[1],
continueWait: true,
renewQuery: normalizedQuery.renewQuery
};
const response = await this.getAdapterApi(req).executeQuery(toExecute);
this.log(req, {
Expand Down

0 comments on commit 9c640ba

Please sign in to comment.