fix: cron enabled=1 + plan-b reenvio automático de imagens ausentes
continuous-integration/webhook Deploy concluído (VPS4)
continuous-integration/webhook Deploy concluído (VPS4)
Bug fix: - server.js e routes/images.js: 'enabled = true' → 'enabled = 1' (PostgreSQL rejeita smallint = boolean — causava 'operator does not exist') Plan B — imagens ausentes no Wasabi: - server.js: pendingReupload (Map clientName → Set<original_filename>) quando getImageBufferWithFallback retorna null no endpoint /thumbnail, scheduleReupload() registra o original_filename e emite 'reupload-files' imediatamente se o cliente estiver online, ou na próxima conexão. - server.js: client-identify agora drena a fila pendente do cliente ao reconectar, antes de emitir clients-list-updated. - original_filename adicionado ao SELECT do endpoint /thumbnail. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -571,7 +571,7 @@ router.post('/backfill-thumbs', async (req, res) => {
|
||||
const rows = await db.all(
|
||||
`SELECT id, filename, clinic_name, client_name, patient_name
|
||||
FROM images
|
||||
WHERE thumb_filename IS NULL AND enabled = true
|
||||
WHERE thumb_filename IS NULL AND enabled = 1
|
||||
ORDER BY created_at DESC`
|
||||
);
|
||||
res.json({ queued: rows.length, message: 'Backfill iniciado em background' });
|
||||
|
||||
Reference in New Issue
Block a user