Files
hatchet/examples/python/durable_eviction/capacity_worker.py
T
matt 43e7466d0f Feat: Durable Execution Revamp (#2954)
* Feat: Durable Execution Revamp

---------

Co-authored-by: Gabe Ruttner <gabriel.ruttner@gmail.com>
2026-03-16 11:24:29 -04:00

24 lines
528 B
Python

"""
Dedicated worker for capacity-eviction e2e tests.
Runs with durable_slots=1 so that a single waiting durable task triggers
capacity pressure and gets evicted (even with ttl=None).
"""
from __future__ import annotations
from examples.durable_eviction.worker import capacity_evictable_sleep, hatchet
def main() -> None:
worker = hatchet.worker(
"capacity-eviction-worker",
durable_slots=1,
workflows=[capacity_evictable_sleep],
)
worker.start()
if __name__ == "__main__":
main()