From 62c1459afcca368a6712d75ead4d7c4f1c68dd82 Mon Sep 17 00:00:00 2001 From: Josh Wulf Date: Fri, 24 Jan 2025 15:48:35 +1300 Subject: [PATCH] fix(zeebe): move polling blocked log message to new verbose level. fixes #356 --- README.md | 1 + src/zeebe/lib/ZBWorkerBase.ts | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0bcb7a2b..c1bfeb6e 100644 --- a/README.md +++ b/README.md @@ -223,6 +223,7 @@ The SDK uses the [`debug`](https://github.com/debug-js/debug) library. To enable | `camunda:oauth` | OAuth Token Exchange | | `camunda:grpc` | Zeebe gRPC channel | | `camunda:worker` | Zeebe Worker | +| `camunda:worker:verbose`| Zeebe Worker (additional detail) | | `camunda:zeebeclient` | Zeebe Client | Here is an example of turning on debugging for the OAuth and Operate components: diff --git a/src/zeebe/lib/ZBWorkerBase.ts b/src/zeebe/lib/ZBWorkerBase.ts index 20598230..bfc814b9 100644 --- a/src/zeebe/lib/ZBWorkerBase.ts +++ b/src/zeebe/lib/ZBWorkerBase.ts @@ -26,6 +26,8 @@ import { ZBClientOptions } from './interfaces-published-contract' import { parseVariablesAndCustomHeadersToJSON } from '.' const debug = d('camunda:worker') +const verbose = d('camunda:worker:verbose') + debug('Loaded ZBWorkerBase') const MIN_ACTIVE_JOBS_RATIO_BEFORE_ACTIVATING_JOBS = 0.3 @@ -475,7 +477,7 @@ You should call only one job action method in the worker handler. This is a bug workerIsClosing || insufficientCapacityAvailable ) { - debug('Worker polling blocked', { + verbose('Worker polling blocked', { pollAlreadyInProgress, workerIsClosing, insufficientCapacityAvailable,