Skip to content

Commit

Permalink
Increase temporal worker max concurrency to 500 (#1686)
Browse files Browse the repository at this point in the history
In case a backlog of Temporal activities forms we want jobs to be able
to process more than 50 at a time
  • Loading branch information
TBonnin authored Feb 16, 2024
1 parent a14f1e1 commit a960369
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/jobs/lib/temporal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import { createRequire } from 'module';
import * as activities from './activities.js';
import { SYNC_TASK_QUEUE, WEBHOOK_TASK_QUEUE, isProd, isEnterprise } from '@nangohq/shared';

const TEMPORAL_WORKER_MAX_CONCURRENCY = parseInt(process.env['TEMPORAL_WORKER_MAX_CONCURRENCY'] || '0') || 500;

export class Temporal {
namespace: string;
workers: Worker[] | null;
Expand Down Expand Up @@ -48,7 +50,7 @@ export class Temporal {
namespace: this.namespace,
workflowsPath: createRequire(import.meta.url).resolve('./workflows'),
activities,
maxConcurrentWorkflowTaskExecutions: 50,
maxConcurrentWorkflowTaskExecutions: TEMPORAL_WORKER_MAX_CONCURRENCY,
taskQueue: SYNC_TASK_QUEUE
};

Expand Down

0 comments on commit a960369

Please sign in to comment.