Skip to content

Commit

Permalink
feat: geolocation support for python transformations
Browse files Browse the repository at this point in the history
  • Loading branch information
Jayachand committed Sep 30, 2023
1 parent 56c80f2 commit e8f2a80
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/util/openfaas/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const FAAS_MAX_INFLIGHT = process.env.FAAS_MAX_INFLIGHT || '4';
const FAAS_EXEC_TIMEOUT = process.env.FAAS_EXEC_TIMEOUT || '4s';
const FAAS_ENABLE_WATCHDOG_ENV_VARS = process.env.FAAS_ENABLE_WATCHDOG_ENV_VARS || 'true';
const CONFIG_BACKEND_URL = process.env.CONFIG_BACKEND_URL || 'https://api.rudderlabs.com';
const GEOLOCATION_URL = process.env.GEOLOCATION_URL || '';
const FAAS_AST_VID = 'ast';
const FAAS_AST_FN_NAME = 'fn-ast';

Expand Down Expand Up @@ -123,6 +124,10 @@ const deployFaasFunction = async (functionName, code, versionId, libraryVersionI
envProcess = `${envProcess} --code "${code}" --config-backend-url ${CONFIG_BACKEND_URL} --lvids "${lvidsString}"`;
}

if (GEOLOCATION_URL) {
envProcess = `${envProcess} --geolocation-url ${GEOLOCATION_URL}`;

Check warning on line 128 in src/util/openfaas/index.js

View check run for this annotation

Codecov / codecov/patch

src/util/openfaas/index.js#L128

Added line #L128 was not covered by tests
}

const envVars = {};
if (FAAS_ENABLE_WATCHDOG_ENV_VARS.trim().toLowerCase() === 'true') {
envVars.max_inflight = FAAS_MAX_INFLIGHT;
Expand Down

0 comments on commit e8f2a80

Please sign in to comment.