convex: mover action de envio de alertas para arquivo Node ('alerts_actions.ts' com 'use node'); remover import de 'tls' do módulo de queries/mutations; ajustar cron para usar api.alerts_actions; remover tentativa de envio de e-mail no mutation addComment (evitar Node API em isolate).

This commit is contained in:
Esdras Renan 2025-10-07 17:04:38 -03:00
parent 3814203de3
commit 5b14ecbe0f
5 changed files with 165 additions and 243 deletions

View file

@ -4,6 +4,6 @@ import { api } from "./_generated/api"
const crons = cronJobs()
// Check hourly and the action will gate by America/Sao_Paulo hour
crons.interval("hours-usage-alerts-hourly", { hours: 1 }, api.alerts.sendHoursUsageAlerts)
crons.interval("hours-usage-alerts-hourly", { hours: 1 }, api.alerts_actions.sendHoursUsageAlerts)
export default crons