Elements runtime reference / Live streaming

emitProgress

Emit a live progress/status event during ExecuteStream runs.

Signatuur

emitProgress(payload=None, **kwargs)

Doel

Emit a live progress/status event during ExecuteStream runs.

Aliases and imports

  • emit_progress
  • progress

Payloadformaat

Use these fields as the Python call arguments or keyword payload for this helper.

{
  "phase": "running",
  "message": "Loaded batch",
  "progressPercent": 50,
  "details": {
    "batch": 2
  }
}
FieldDescription
payloadOptional dict with phase, message, progressPercent, and details.
kwargsMerged into payload.

Return payload

{
  "event": "progress",
  "phase": "running",
  "message": "Loaded batch",
  "progressPercent": 50,
  "details": {
    "batch": 2
  }
}

Voorbeeld

def run():
    emitProgress(phase="running", message="Loaded batch", progressPercent=50)
    return {"ok": True}

Scope-notities