TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/cadence-workflow/cadence/llms.txt
Use this file to discover all available pages before exploring further.
tasklist command group provides operations for inspecting task list status and managing task list partitions.
Command Overview
tl
What is a Task List?
A task list is a queue where Cadence places tasks (decisions or activities) for workers to consume. Key concepts:- Decision Tasks: Workflow logic execution tasks
- Activity Tasks: Activity execution tasks
- Pollers: Workers polling for tasks
- Partitions: Task list can be partitioned for scalability
Task List Operations
describe
Show task list information including active pollers.Task list name
Task list type:
decision or activitylist-partition
List task list partitions and their host assignments.Task list name
Task list type:
decision or activityUnderstanding Task List Output
Poller Information
- identity: Worker identifier (format:
<worker-name>@<hostname>) - lastAccessTime: Last time worker polled for tasks
- ratePerSecond: Polling rate in requests per second
Task List Status
- backlogCountHint: Approximate number of pending tasks
- readLevel: Current read position in task queue
- ackLevel: Last acknowledged task position
- ratePerSecond: Overall task processing rate
Common Use Cases
Check Worker Health
Verify workers are actively polling:- Multiple active pollers
- Recent lastAccessTime (< 30s ago)
- Stable ratePerSecond values
Monitor Task Backlog
Check for task accumulation:- High
backlogCountHint: May need more workers - Large gap between
readLevelandackLevel: Processing delays
Verify Task Distribution
Check partition distribution for scaled task lists:- Partitions are evenly distributed across hosts
- All partitions have assigned hosts
Decision vs Activity Task Lists
Decision Task Lists
Used for workflow decision tasks:- Typically higher throughput
- Shorter execution time
- One decision task per workflow state change
Activity Task Lists
Used for activity tasks:- Variable execution time
- Can have dedicated task lists per activity type
- May require different scaling
Task List Patterns
Single Task List
Simple setup for low-volume workflows:Activity-Specific Task Lists
Separate task lists for different activity types:Partitioned Task Lists
High-throughput scenarios with multiple partitions:Monitoring and Troubleshooting
No active pollers
No active pollers
Problem:
pollers array is emptyCauses:- Workers are not running
- Workers are polling different task list
- Network connectivity issues
High backlog
High backlog
Problem:
backlogCountHint is very highCauses:- Insufficient worker capacity
- Slow activity/decision execution
- Worker resource constraints
- Scale up worker instances
- Optimize activity code
- Use separate task lists for slow operations
- Consider task list partitioning
Stale pollers
Stale pollers
Problem:
lastAccessTime is old (> 60s)Causes:- Worker crashed but not cleaned up
- Worker stuck in long operation
- Network issues
- Check worker health/logs
- Restart workers if necessary
- Verify network connectivity
Uneven partition distribution
Uneven partition distribution
Problem: Partitions concentrated on few hostsCauses:
- Host failures not detected
- Cluster rebalancing needed
- Check matching service health
- Wait for automatic rebalancing
- Contact admin if persistent
Performance Metrics
Key Metrics to Monitor
- Active Pollers: Should be > 0, ideally multiple
- Backlog Count: Should be low relative to processing rate
- Rate Per Second: Should be stable and match expected load
- Last Access Time: Should be recent (< 10s for active systems)
Example Health Check Script
Best Practices
- Naming: Use descriptive task list names (e.g.,
payments-processor,email-sender) - Monitoring: Regularly check task list health in production
- Separation: Use different task lists for different activity types/priorities
- Scaling: Monitor backlog and scale workers accordingly
- Partitioning: Enable for high-throughput task lists (> 1000 tasks/sec)
- Worker Identity: Use meaningful worker identities for debugging
Worker Configuration
When configuring workers, ensure task list names match:Next Steps
Workflow Commands
Start workflows using task lists
Admin Task List
Advanced task list administration
Go SDK Workers
Configure workers for task lists
Scaling Guide
Learn about scaling workers