AI-Powered Inventory Demand Forecasting, Auto-Generate Purchase Orders with OpenAI
Forecast 7-day demand with OpenAI GPT-4o, auto-generate purchase orders for stockout-risk SKUs, and log them to PostgreSQL every 6 hours.
Audits Apache Airflow REST API for stalled queued DAG runs and scheduler heartbeats to prevent pipeline delays.
This workflow queries the Apache Airflow Stable REST API (/api/v1/dags/~/dagRuns?state=queued) to monitor the total volume of DAG runs stuck in the queued state. In Apache Airflow, when scheduler processes crash, experience database deadlock contention, or when worker slots (Celery, KubernetesExecutor) are exhausted by long-running sensor tasks, DAG runs pile up in the queue without transitioning to running. This workflow tracks queued runs and alerts data engineering teams before batch SLA breaches occur.
AIRFLOW_PASSWORD and SLACK_WEBHOOK configured in Kestra./api/v1/health to verify Airflow scheduler heartbeat timestamp.