Build a customer loyalty program with Entity Workflows
Give each customer a long-running Workflow that accrues points, recalculates tiers, and handles redemptions, using Continue-As-New and Worker Versioning.
Give each customer a long-running Workflow that accrues points, recalculates tiers, and handles redemptions, using Continue-As-New and Worker Versioning.
Wait durably for reviewer decisions, enforce SLAs with Timers, escalate to a backup approver, handle resubmissions, and keep an audit trail, in Python.
Model each player as an Actor Workflow that holds session state, runs game actions, and survives server crashes, with a complete Python implementation.
Rate-limits calls to a downstream service by routing throttled Activities to a dedicated Task Queue with a server-enforced throughput cap.
Distributes Task dispatches across tenants or users so that a burst from one caller does not starve others.
Assigns a priority level to Workflows and Activities so that time-sensitive work dispatches ahead of lower-priority work within a single Task Queue.
Give GPU, high-memory, and CPU Activities their own Task Queues so each runs only on Workers with the right hardware, shown with a Python ML pipeline.
Keep downloaded files, loaded ML models, and open connections on one machine by routing each Activity to a Worker-specific Task Queue, with Python code.
Use Task Queue backlog metrics and CLI or SDK queries to evaluate Worker load and tune Task Queue processing.
Control Task dispatch order within a Task Queue using priority levels, and use Fairness to stop tenants from blocking each other.
Interactively explore how Task Queue Priority and Fairness control dispatch order. Step through scenarios, see which task gets picked next and why, then grab the SDK code.
Explore the role of Worker Processes in polling Task Queues and executing Tasks.
A mismatch in Task Queue names creates separate queues, preventing the Worker from receiving tasks and stalling Workflow Execution.
Learn about routing Tasks and Worker Sessions.
Routes Activities to specific Workers using unique Task Queues for Worker affinity and host-specific processing.