v3 : publication robuste et visible dans trustinWallet
- Clé de publication ed25519 générée au démarrage dans le volume ; sa partie publique et l'état de la file d'envoi s'affichent dans /acces. - Publication initiale à l'instanciation d'un document seedé publiable. - Reprise au démarrage : chaque document publié repasse une fois dans la file ; la date publiée est celle du dernier changement, un document inchangé ne fait pas de commit (testé contre un dépôt nu). - Le travailleur fait un premier passage sans attendre ; journaux sans codes couleur hors terminal. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -145,11 +145,11 @@ async fn instantiate(state: &AppState, seed: &SeedDoc, inst: &SeedInstance) -> a
|
||||
.bind(&doc_id)
|
||||
.bind(&unit.code)
|
||||
.bind(&unit.section)
|
||||
.bind(unit.position)
|
||||
.bind(&unit.inertia)
|
||||
.bind(&now)
|
||||
.execute(&mut *tx)
|
||||
.await?;
|
||||
.bind(unit.position)
|
||||
.bind(&unit.inertia)
|
||||
.bind(&now)
|
||||
.execute(&mut *tx)
|
||||
.await?;
|
||||
for v in &unit.versions {
|
||||
let pid = util::id();
|
||||
let (title, body) = (pick(&v.title), pick(&v.body));
|
||||
@@ -204,6 +204,16 @@ async fn instantiate(state: &AppState, seed: &SeedDoc, inst: &SeedInstance) -> a
|
||||
}
|
||||
}
|
||||
}
|
||||
if inst.publish_path.is_some() {
|
||||
sqlx::query(
|
||||
"INSERT INTO outbox (doc_id, reason, created_at, next_at) VALUES (?, 'publication initiale', ?, ?)",
|
||||
)
|
||||
.bind(&doc_id)
|
||||
.bind(&now)
|
||||
.bind(&now)
|
||||
.execute(&mut *tx)
|
||||
.await?;
|
||||
}
|
||||
tx.commit().await?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user