Skip to content

# pgflow 0.6.1: Worker Configuration in Handler Context

Sep 5, 2025 - 1 min read
Wojciech Majewski (@jumski)
Creator and Maintainer

pgflow 0.6.1 adds `workerConfig` to the handler execution context, enabling intelligent decision-making based on worker configuration.

## Worker Configuration in Context

Section titled “Worker Configuration in Context”

Handlers now have access to the complete worker configuration through `context.workerConfig` (#200). This enables smarter handlers that can adapt their behavior based on retry limits, concurrency settings, timeouts, and other worker parameters.

    async function sendEmail(input, context) {  const isLastAttempt = context.rawMessage.read_ct >= context.workerConfig.retry.limit;
      if (isLastAttempt) {    // Use fallback email service on final attempt    return await sendWithFallbackProvider(input.to, input.subject, input.body);  }
      // Use primary email service for regular attempts  return await sendWithPrimaryProvider(input.to, input.subject, input.body);}

See the context documentation for complete details on available configuration properties and additional examples.

## Bug Fix

Section titled “Bug Fix”

This release also fixes retry strategy validation to only enforce the 50-limit cap for exponential retry strategy, allowing higher limits for fixed strategy when needed (#199).

## Updating to 0.6.1

Section titled “Updating to 0.6.1”

Follow our update guide for step-by-step upgrade instructions.