Skip to content

Commit

Permalink
start capturing max concurrent workers in env to the service
Browse files Browse the repository at this point in the history
  • Loading branch information
abhimanyubabbar committed Feb 26, 2024
1 parent 9fa5374 commit d9e606d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/util/openfaas/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const stats = require('../stats');
const { getMetadata, getTransformationMetadata } = require('../../v0/util');
const { HTTP_STATUS_CODES } = require('../../v0/util/constant');

const FAAS_MAX_CONCURRENT_WORKERS = process.env.FAAS_MAX_CONCURRENT_WORKERS || '1';
const FAAS_BASE_IMG = process.env.FAAS_BASE_IMG || 'rudderlabs/openfaas-flask:main';
const FAAS_MAX_PODS_IN_TEXT = process.env.FAAS_MAX_PODS_IN_TEXT || '40';
const FAAS_MIN_PODS_IN_TEXT = process.env.FAAS_MIN_PODS_IN_TEXT || '1';
Expand Down Expand Up @@ -135,7 +136,10 @@ const deployFaasFunction = async (
envProcess = `${envProcess} --code "${code}" --config-backend-url ${CONFIG_BACKEND_URL} --lvids "${lvidsString}"`;
}

const envVars = {};
const envVars = {

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

View check run for this annotation

Codecov / codecov/patch

src/util/openfaas/index.js#L139

Added line #L139 was not covered by tests
max_concurrent_workers: FAAS_MAX_CONCURRENT_WORKERS,
};

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

0 comments on commit d9e606d

Please sign in to comment.