Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit45c0aca

Browse files
committed
Fix comments
1 parent399dad7 commit45c0aca

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

‎agent/agent.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,9 @@ func (a *agent) trackScriptLogs(ctx context.Context, reader io.Reader) (chan str
778778
// coming in.
779779
logsFinished:=make(chanstruct{})
780780
err:=a.trackConnGoroutine(func() {
781+
buffer:=make([]byte,0,1<<20)
781782
scanner:=bufio.NewScanner(reader)
783+
scanner.Buffer(buffer,1<<20)
782784
forscanner.Scan() {
783785
queueLog(agentsdk.StartupLog{
784786
CreatedAt:database.Now(),

‎coderd/database/migrations/000110_add_startup_logs.up.sql

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
BEGIN;
2+
13
CREATETABLEIF NOT EXISTS workspace_agent_startup_logs (
24
agent_id uuidNOT NULLREFERENCES workspace_agents (id)ON DELETE CASCADE,
35
created_attimestamptzNOT NULL,
@@ -12,3 +14,5 @@ ALTER TABLE workspace_agents ADD COLUMN startup_logs_overflowed boolean NOT NULL
1214

1315
COMMENT ON COLUMN workspace_agents.startup_logs_length IS'Total length of startup logs';
1416
COMMENT ON COLUMN workspace_agents.startup_logs_overflowed IS'Whether the startup logs overflowed in length';
17+
18+
COMMIT;

‎coderd/workspaceagents.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,6 @@ func (api *API) workspaceAgentStartupLogs(rw http.ResponseWriter, r *http.Reques
423423
}
424424

425425
var (
426-
// It's not impossible that
427426
bufferedLogs=make(chan []database.WorkspaceAgentStartupLog,128)
428427
endOfLogs atomic.Bool
429428
lastSentLogID atomic.Int64

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp