Skip to content

Real-time progress streaming for bulk jobs (SSE)#458

Merged
Nitya-003 merged 5 commits into
Nitya-003:mainfrom
Aditya8369:447
Jun 20, 2026
Merged

Real-time progress streaming for bulk jobs (SSE)#458
Nitya-003 merged 5 commits into
Nitya-003:mainfrom
Aditya8369:447

Conversation

@Aditya8369

Copy link
Copy Markdown
Contributor

Implemented real-time progress streaming for bulk jobs via SSE (server-sent events).

What changed
Backend: SSE route
backend/routes/verification.js
Added:
GET /api/verification/bulk/:jobId/events/stream
Protected with protect + adminOnly
Backend: SSE controller
backend/controllers/verificationController.js
Added streamBulkJobEvents(req, res)
SSE headers set:
Content-Type: text/event-stream
Cache-Control: no-cache, no-transform
Connection: keep-alive
Emits events:
event: heartbeat (initial + periodic)
event: jobStatus with { status, totalRows, processedRows, successCount, failureCount }
event: rowResult for newly-available rows (derived from job.results up to processedRows)
event: done when status becomes completed or failed
event: error on failure
Polls BulkVerificationJob.findById(jobId) until done.
Backend test
backend/tests/verificationBulkSse.test.js
Validates SSE framing and that jobStatus + done events appear.

closes #447

@vercel

vercel Bot commented Jun 20, 2026

Copy link
Copy Markdown

@Aditya8369 is attempting to deploy a commit to the Nitya Gosain's projects Team on Vercel.

A member of the Team first needs to authorize it.

@Nitya-003 Nitya-003 added bug Something isn't working gssoc:approved gssoc'26 approved quality:clean *1.2 for contributor +5 pts for mentor level:intermediate 35 pts for contributor 20 pts for mentor type:bug labels Jun 20, 2026
@Nitya-003 Nitya-003 merged commit 62a32cb into Nitya-003:main Jun 20, 2026
3 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working gssoc:approved gssoc'26 approved level:intermediate 35 pts for contributor 20 pts for mentor quality:clean *1.2 for contributor +5 pts for mentor type:bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Real-time progress streaming for bulk jobs (SSE)

2 participants