Skip to content

Conversation

@lt-zeeshan
Copy link
Contributor

This pull request introduces support for configurable concurrent snapshot processing in the queue system. The main changes include adding a new MAX_CONCURRENT_PROCESSING environment variable, updating the Env type, and refactoring the snapshot queue logic to process multiple snapshots in parallel based on this configuration.

Configurable concurrency for snapshot processing:

  • Added a new environment variable MAX_CONCURRENT_PROCESSING to control the maximum number of snapshots processed in parallel, with parsing and defaulting logic in src/lib/env.ts and the Env type updated in src/types.ts. [1] [2] [3]
  • Introduced MAX_CONCURRENT_PROCESSING and activeProcessingCount properties in the Queue class (src/lib/snapshotQueue.ts) to manage and track concurrent processing.

Queue processing logic improvements:

  • Refactored the processNext method in Queue to batch and process multiple snapshots concurrently when remote discovery is enabled and certain config flags are set, using the new concurrency controls.
  • Added a new processSnapshot method to encapsulate single snapshot processing, and updated flow to avoid recursive calls and ensure proper concurrency management. [1] [2] [3]

@sushobhit-lt sushobhit-lt merged commit 9f8793c into LambdaTest:stage Oct 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants