jaikit-flows
Login

kpi_dashboard_refresh — KPI cross-apps — refresh horaire

sha=94687f265f52 · visibility=admin · tags=kpi, hourly
🚫 Workflow bloqué — composants manquants (2)

Le bouton "Run now" est désactivé tant que ces erreurs ne sont pas résolues.

id: kpi_dashboard_refresh
name: KPI cross-apps — refresh horaire
description: |
  Toutes les heures, agrège les KPI de chaque app jaikit et publie une
  page HTML statique vers jaikit-MainVitrine.

owner: admin
visibility: admin
tags: [kpi, hourly]

triggers:
  - type: interval
    every: 1h

inputs:
  apps:
    type: list
    default: [car, patterns, vibe, profilpilot, formations]

env:
  OUT_PATH: /mnt/d/BOULOT/jaikit-MainVitrine/static/kpi/index.html

steps:

  - id: collect_each
    node: jaikit.kpi_collect
    foreach: ${{ inputs.apps }}
    with:
      app: ${{ each }}

  - id: render
    node: jaikit.kpi_render
    with:
      snapshots: ${{ steps.collect_each.outputs }}
      out_path: ${{ env.OUT_PATH }}

  - id: snapshot_archive
    node: fs.write
    with:
      path: data/kpi_snapshots/${{ run.id }}.json
      content: ${{ steps.collect_each.outputs | json }}

on_failure:
  - id: notify_fail
    node: notif.telegram
    with:
      message: "❌ kpi_dashboard_refresh a échoué — run ${{ run.id }}"