Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 44bf343

Browse files
committed
Comment
1 parent 9c2f64a commit 44bf343

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

coderd/database/databasefake/databasefake.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -947,6 +947,8 @@ func (q *fakeQuerier) GetAuthorizedWorkspaces(ctx context.Context, arg database.
947947
return convertToWorkspaceRows(workspaces, int64(beforePageCount)), nil
948948
}
949949

950+
// mapAgentStatus determines the agent status based on different timestamps like created_at, last_connected_at, disconnected_at, etc.
951+
// The function must be in sync with: coderd/workspaceagents.go:convertWorkspaceAgent.
950952
func mapAgentStatus(dbAgent database.WorkspaceAgent, agentInactiveDisconnectTimeoutSeconds int64) string {
951953
var status string
952954
connectionTimeout := time.Duration(dbAgent.ConnectionTimeoutSeconds) * time.Second

0 commit comments

Comments
 (0)