Blazing iconBlazing
Coming SoonDev Preview

This content is part of an upcoming preview program. Request early access

Basic Task Execution

Edit on GitHub

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 data
  • quick_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

Source

This example is based on the test suite:

  • tests/test_infrastructure.py::test_simple_timeseries_fetch