MCPcopy Index your code
hub / github.com/coder/coder / ActivityBumpWorkspace

Method ActivityBumpWorkspace

coderd/database/queries.sql.go:109–112  ·  view source on GitHub ↗

Bumps the workspace deadline by the template's configured "activity_bump" duration (default 1h). If the workspace bump will cross an autostart threshold, then the bump is autostart + TTL. This is the deadline behavior if the workspace was to autostart from a stopped state. Max deadline is respected

(ctx context.Context, arg ActivityBumpWorkspaceParams)

Source from the content-addressed store, hash-verified

107// We only bump if workspace shutdown is manual.
108// We only bump when 5% of the deadline has elapsed.
109func (q *sqlQuerier) ActivityBumpWorkspace(ctx context.Context, arg ActivityBumpWorkspaceParams) error {
110 _, err := q.db.ExecContext(ctx, activityBumpWorkspace, arg.NextAutostart, arg.WorkspaceID)
111 return err
112}
113
114const deleteAIProviderKey = `-- name: DeleteAIProviderKey :exec
115DELETE FROM

Callers

nothing calls this directly

Calls 1

ExecContextMethod · 0.80

Tested by

no test coverage detected