fix: batch 4 — connection pooling, graceful shutdown, email verification UX
- Prisma: connection_limit=10, pool_timeout=30 on DATABASE_URL in both compose files - Graceful shutdown: SIGTERM/SIGINT forwarded to Node process in docker-entrypoint.sh - testEmailConnection: replaced real email send with transporter.verify(), simplified UI to single button - NotificationLog.userId index: confirmed already present, no change needed Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -322,12 +322,11 @@ export const settingsRouter = router({
|
||||
* Test email connection
|
||||
*/
|
||||
testEmailConnection: superAdminProcedure
|
||||
.input(z.object({ testEmail: z.string().email() }))
|
||||
.mutation(async ({ ctx, input }) => {
|
||||
.mutation(async () => {
|
||||
try {
|
||||
const { sendTestEmail } = await import('@/lib/email')
|
||||
const success = await sendTestEmail(input.testEmail)
|
||||
return { success, error: success ? null : 'Failed to send test email' }
|
||||
const { verifyEmailConnection } = await import('@/lib/email')
|
||||
const success = await verifyEmailConnection()
|
||||
return { success, error: success ? null : 'SMTP connection verification failed' }
|
||||
} catch (error) {
|
||||
const message = error instanceof Error ? error.message : 'Unknown error'
|
||||
return { success: false, error: `Email configuration error: ${message}` }
|
||||
|
||||
Reference in New Issue
Block a user