Project homepage Mailing List  Warmcat.com  API Docs  Github Mirror 
    npro  
 Modern all-safe Rust Network Protocol library supporting h1, h2, h3, ws, wt sans-IO and with socket IO + tls
git clone https://npro.rs/repo/npro
 
root / src / jig / CMakeLists.txt
Author[]Andy Green <andy@warmcat.com> 2026-09-28 15:17 UTC
Committer[]Andy Green <andy@warmcat.com> 2026-09-28 15:17 UTC
Tree4549666f49a6baaba67472fa7a07e2bfc44cd98a   Raw Patch
 
server: tell sai-web about events that notifications create
server: tell sai-web about events that notifications create

Ad-hoc events are announced to sai-web with an eventchange as soon as
they are created, but events created by a hook notification were not:
sai-web only heard of them when their state first changed, once their
tasks started building.  Announce them the same way, so browsers see a
new event straight away, and anything waiting on changes to the event
list in sai-web is woken for it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
diff --git a/src/server/s-notification.c b/src/server/s-notification.c index 4977830..ed54b2e 100644 --- a/src/server/s-notification.c +++ b/src/server/s-notification.c @@ -1140,6 +1140,14 @@ sai_notification_file_upload_cb(void *data, const char *name, lwsl_notice("%s: notification inserted into db\n", __func__); /* + * Let sai-web know the event exists now, the same as for an + * ad-hoc event: otherwise it only hears about it once its + * state first changes, when the tasks start building. + */ + sais_eventchange(pss->vhd->h_ss_websrv, pss->sn.e.uuid, + SAIES_WAITING); + + /* * The tasks are all in there but set to state * NOT_READY_FOR_BUILD, the periodic central scan * switch them over to WAITING when they have been like that
Page fetched 0s ago, creation time: 2ms (vhost etag hits: 0%, cache hits: 0%)