Skip to content

Commit

Permalink
Adn env var for Gisida timeout duration
Browse files Browse the repository at this point in the history
  • Loading branch information
moshthepitt committed Oct 17, 2019
1 parent 576f079 commit a37b9f4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ REACT_APP_SUPERSET_IRS_REPORTING_INDICATOR_ROWS=zambia2019
REACT_APP_SUPERSET_STRUCTURES_SLICE=0
REACT_APP_SUPERSET_TASKS_SLICE=0
REACT_APP_SUPERSET_PLAN_STRUCTURE_PIVOT_SLICE=0
REACT_APP_GISIDA_TIMEOUT=3000
REACT_APP_GISIDA_MAPBOX_TOKEN=hunter2
REACT_APP_GISIDA_ONADATA_API_TOKEN=hunter2
REACT_APP_DIGITAL_GLOBE_CONNECT_ID=mylifeforaiur
Expand Down
3 changes: 3 additions & 0 deletions src/configs/__mocks__/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ export type SUPERSET_PLANS_SLICE = typeof SUPERSET_PLANS_SLICE;
export const SUPERSET_MAX_RECORDS = 3000;
export type SUPERSET_MAX_RECORDS = typeof SUPERSET_MAX_RECORDS;

export const GISIDA_TIMEOUT = 3000;
export type GISIDA_TIMEOUT = typeof GISIDA_TIMEOUT;

export const GISIDA_MAPBOX_TOKEN = 'hunter2';
export type GISIDA_MAPBOX_TOKEN = typeof GISIDA_MAPBOX_TOKEN;

Expand Down
4 changes: 4 additions & 0 deletions src/configs/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@ export type ONADATA_USER_URL = typeof ONADATA_USER_URL;
export const ONADATA_OAUTH_STATE = process.env.REACT_APP_ONADATA_OAUTH_STATE || 'onadata';
export type ONADATA_OAUTH_STATE = typeof ONADATA_OAUTH_STATE;

/** The max number of records to get from Superset API endpoint */
export const GISIDA_TIMEOUT = Number(process.env.REACT_APP_GISIDA_TIMEOUT) || 3000;
export type GISIDA_TIMEOUT = typeof GISIDA_TIMEOUT;

export const GISIDA_MAPBOX_TOKEN = process.env.REACT_APP_GISIDA_MAPBOX_TOKEN || '';
export type GISIDA_MAPBOX_TOKEN = typeof GISIDA_MAPBOX_TOKEN;

Expand Down

0 comments on commit a37b9f4

Please sign in to comment.