Coming SoonDev Preview
This content is part of an upcoming preview program. Request early access
Basic Task Execution
Create and execute your first distributed task with Blazing Batch
Learn how to create and execute distributed tasks using Blazing Batch's async API.
Prerequisites
- Blazing Batch Python SDK installed
- Redis running (default:
localhost:6380) - Access to Blazing Batch API endpoint
Quick Start
1. Initialize the App
Python
2. Create a Simple Task
Python
3. Wait for Results
Python
Complete Example
Here's a complete working example:
Python
Key Concepts
Workflows
Workflows are multi-step task orchestrations that define:
- Task parameters
- Execution logic with multiple steps
- Return types
Common workflows:
fetch_timeseries- Fetch time series dataquick_lookup- Quick data lookups- Custom workflows defined by your organization
Units
A unit represents a single task execution:
- Created by
create_workflow_task() - Can be gathered for results
- Executed asynchronously by workers
Gather vs Wait
Python
Next Steps
- Parallel Task Execution - Run multiple tasks concurrently
- Error Handling - Handle failures gracefully
- Concurrency Patterns - Advanced patterns
Source
This example is based on the test suite:
tests/test_infrastructure.py::test_simple_timeseries_fetch