@onlineapps/conn-orch-orchestrator 1.0.53 → 1.0.54

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onlineapps/conn-orch-orchestrator",
3
- "version": "1.0.53",
3
+ "version": "1.0.54",
4
4
  "description": "Workflow orchestration connector for OA Drive - handles message routing and workflow execution",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -245,7 +245,14 @@ class WorkflowOrchestrator {
245
245
 
246
246
  // Get existing retry history from _execution.retry_history
247
247
  const stepRetryHistory = currentStepDef._execution?.retry_history || [];
248
- const attemptNumber = stepRetryHistory.length + 1;
248
+
249
+ // Count only actual retry attempts (not dlq_entered, requeued, or other records)
250
+ // After requeue, we start fresh with new attempts
251
+ const lastRequeueIndex = stepRetryHistory.findLastIndex(r => r.requeued);
252
+ const attemptsAfterRequeue = lastRequeueIndex >= 0
253
+ ? stepRetryHistory.slice(lastRequeueIndex + 1).filter(r => r.attempt).length
254
+ : stepRetryHistory.filter(r => r.attempt).length;
255
+ const attemptNumber = attemptsAfterRequeue + 1;
249
256
 
250
257
  // Generate error reference for log lookup (instead of full stack trace)
251
258
  const errorRef = `err-${Date.now()}-${crypto.randomBytes(4).toString('hex')}`;