Skip to content

iDeploy: write a running deployment's log every 2 s (CLI, reloaded pages) - #387

Merged
DJTJ21 merged 1 commit into
devfrom
feat/ideploy-live-deploy-logs
Oct 19, 2026
Merged

DJTJ21 merged 1 commit into
devfrom
feat/ideploy-live-deploy-logs

Conversation

@DJTJ21

@DJTJ21 DJTJ21 commented Oct 19, 2026

Copy link
Copy Markdown
Collaborator

Why

The idem CLI follows a deployment by polling GET /api/v1/deploy/:uuid. It does not use the realtime socket, whose host and key are generated at the web build. But a deployment's log was written to the database only once the deployment was over: nothing appeared until the end. Same for a page reloaded during a build.

Change

deployment.worker.ts: every log line schedules a write of the kept log, at most every 2 s (LIVE_LOG_FLUSH_MS). The timer is cleared in the finally, so a late write never overwrites the final log or the failure.

Load: one UPDATE every 2 s per running deployment.

The log was written only once the deployment was over: a client that polls
(the coming CLI, a page reloaded during a build) saw nothing until the end.
It is now also written while the deployment runs, at most every 2 seconds;
the timer is cleared once the final log or failure is written.
@DJTJ21
DJTJ21 merged commit d32c3c3 into dev Oct 19, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant