github hatchet-dev/hatchet py/1.41.1
Python SDK 1.41.1

5 hours ago

Overview

Fixed

  • Durable tasks that fan out to thousands of children no longer block the worker's event loop. The durable listener sent one worker status request per awaited child, each listing every pending child, which was quadratic in the fan-out size; it now sends one request per event loop iteration listing only the newly awaited children.
  • Registering an awaited child no longer scans every pending callback to evict older invocations. The callback cache is indexed by task and invocation.
  • The periodic worker status request lists only children that have been pending for more than two seconds, is sent every five seconds instead of every second, and is split into requests of at most 10,000 entries so it stays under the gRPC message size limit.
  • Re-delivered child completions are matched against pending callbacks without scanning the pending queue.
  • The action listener drains every queued step event in one loop iteration instead of paying a thread hop per event, which removed spurious "event loop may be blocked" warnings on bursts of task starts.

Documentation for agents

The linked pages serve plain markdown for tools and agents. Full docs index: https://docs.hatchet.run/llms.txt

Setup and local development:

Core concepts:

Flow control:

Python SDK reference (overview: https://docs.hatchet.run/reference/python.md):

Installation

Install the SDK using pip:

pip install hatchet-sdk

Or using poetry:

poetry add hatchet-sdk

Documentation

For detailed documentation, examples, and best practices, visit:

What's Changed?

  • ci(python): improve some flaky tests (#5011) by @mrkaye97
  • fix(engine): look up satisfied durable entries by primary key (#5026) by @grutt
  • fix(engine,python): improve performance on large durable fanouts (#5031) by @mrkaye97

Don't miss a new hatchet release

NewReleases is sending notifications on new releases.