Skip to content

Commit

Permalink
fix: add numRuns to GetProjectsByUserActivity (#9581)
Browse files Browse the repository at this point in the history
  • Loading branch information
AmanuelAaron authored Jun 28, 2024
1 parent 4760d95 commit 1e9dc42
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions master/internal/api_project.go
Original file line number Diff line number Diff line change
Expand Up @@ -1031,6 +1031,7 @@ func (a *apiServer) GetProjectsByUserActivity(
p.user_id,
'WORKSPACE_STATE_' || p.state AS state,
p.error_message,
(SELECT COUNT(*) FROM runs as r WHERE r.project_id=p.id) as num_runs,
COUNT(*) FILTER (WHERE e.project_id = p.id) AS num_experiments,
COUNT(*) FILTER (WHERE e.project_id = p.id AND e.state = 'ACTIVE') AS num_active_experiments,
MAX(e.start_time) FILTER (WHERE e.project_id = p.id) AS last_experiment_started_at
Expand Down

0 comments on commit 1e9dc42

Please sign in to comment.