Rimuove il promemoria evento a 24 e 3 ore (DD-043)

La migration m28 toglie i due job pg_cron che generavano il promemoria
prima di ogni evento. Funzione, tipi, registro e notifiche già generate
restano. Migration applicata in produzione.

Nuovo test sui job non più pianificati; documentati DD-043, modulo
notifiche, DATABASE, ROADMAP, WORKER_EMAIL e changelog.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
davideandClaude Sonnet 5.5 committed 2026-10-01 14:49:30 +02:00
1 parent cdf8b144e2
commit e822e4574b
14 files changed
+130 -45

No files matched your search

@@ -5,6 +5,7 @@
* Esegue i job veri del database (`genera_avvisi_palloni`, `genera_solleciti_presenze`) su eventi
* creati con orari relativi a «adesso» e verifica:
*
* - che il promemoria a 24 e 3 ore non sia più pianificato (M28, DD-043);
* - le finestre (palloni: un solo avviso nelle 3 ore prima; solleciti 24·12·6 ore, contigue e senza
* sovrapposizione);
* - i destinatari (incaricato e turno precedente; convocati senza risposta o con «forse»; mai
@@ -795,6 +796,33 @@ if (!locale) {
);
});
await prova("il promemoria a 24 e 3 ore non è più pianificato (M28, DD-043)", async () => {
const contenitore = spawnSync(
"docker",
["ps", "--filter", "name=supabase_db", "--format", "{{.Names}}"],
{ encoding: "utf8" },
)
.stdout.trim()
.split("\n")[0];
assert.ok(contenitore, "container del database locale non trovato");
const esito = spawnSync(
"docker",
[
"exec",
contenitore,
"psql",
"-U",
"postgres",
"-At",
"-c",
"select count(*) from cron.job where jobname like 'promemoria-eventi-%'",
],
{ encoding: "utf8" },
);
assert.equal(esito.status, 0, esito.stderr);
assert.equal(esito.stdout.trim(), "0", "nessun job di promemoria evento");
});
await prova("cancellare l'evento toglie registro e notifiche collegate", async () => {
assert.ok((await registro(MAIN)).length > 0);
await scrivi(`eventi_app?id=eq.${MAIN}`, "DELETE");