Skip to main content

Veri Katmanları Arası Yazım Sırası

Yazım Sırası Özeti

AdımKatmanZorunlulukNot
1Redis cache okumaZorunluCache miss → DB fallback
2automations okuma (is_active + next_run_at)ZorunluTetiklenecek otomasyonlar belirlenir
3automation_runs insert (pending)ZorunluYürütme kaydı açılır
4automations.status = runningZorunluAynı otomasyonun çift tetiklenmesi önlenir
5cinga.automation.command.requested publishZorunluEvent device_command_id referansı taşır
6Communication tarafında device_commands okumaZorunluKomut çözümleme Communication katmanında yapılır
7automation.job.completed.v1 consumeKoşulluBaşarılı iletimde
8automation.job.failed.v1 consumeKoşulluHata durumunda
9automation_runs güncelle (status + codes)ZorunluHer iki yolda da çalışır
10automations güncelle (run_count + sonuç)ZorunluSon çalışma bilgisi yazılır
11automations.next_run_at hesaplaKoşulluYalnızca interval tipi
12automations.status güncelleZorunlupending / completed olarak kapatılır
13Redis cache invalidateZorunluTutarlılık için