File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
internal-packages/run-engine/src/run-queue Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -471,7 +471,16 @@ export class RunQueue {
471471 ) ;
472472 }
473473
474+ /**
475+ * Get the current concurrency of the environment
476+ * @param env - The environment to get the current concurrency of
477+ * @returns The current concurrency of the environment
478+ */
474479 public async currentConcurrencyOfEnvironment ( env : MinimalAuthenticatedEnvironment ) {
480+ // We are now using the envCurrentDequeuedKey to track the current "displayed" concurrency of the environment
481+ // Operationally, we use the envCurrentConcurrencyKey to track the actual concurrency of the environment
482+ // The currentDequeuedKey is incremented when a message is dequeued from the worker queue,
483+ // wherease the currentConcurrencyKey is incremented when a message is dequeued from the message queue and put into the worker queue
475484 return this . redis . scard ( this . keys . envCurrentDequeuedKey ( env ) ) ;
476485 }
477486
You can’t perform that action at this time.
0 commit comments