Skip to content

Commit

Permalink
Bump version to v2.5.0-rc3
Browse files Browse the repository at this point in the history
  • Loading branch information
polyaxon-ci committed Oct 4, 2024
1 parent 9d033fb commit b712e30
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
22 changes: 12 additions & 10 deletions haupt/haupt/db/managers/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,28 +216,30 @@ def filter_queryset(cls, queryset, request, view):
return queryset


def annotate_statuses(queryset):
return queryset.annotate(
count=Count(
"runs",
distinct=True,
),
running=Count(
def annotate_statuses(queryset, include_total=False):
agg = {
"running": Count(
"runs",
filter=Q(runs__status__in=LifeCycle.RUNNING_VALUES),
distinct=True,
),
pending=Count(
"pending": Count(
"runs",
filter=Q(runs__status__in=LifeCycle.ALL_PENDING_VALUES),
distinct=True,
),
warning=Count(
"warning": Count(
"runs",
filter=Q(runs__status__in=LifeCycle.ALL_WARNING_VALUES),
distinct=True,
),
)
}
if include_total:
agg["count"] = Count(
"runs",
distinct=True,
)
return queryset.annotate(**agg)


def annotate_quota(queryset):
Expand Down
2 changes: 1 addition & 1 deletion haupt/haupt/pkg.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
NAME = "haupt"
VERSION = "2.4.0"
VERSION = "2.5.0-rc3"
DESC = (
"Lineage metadata API, artifacts streams, sandbox, ML-API, and spaces for Polyaxon."
)
Expand Down

0 comments on commit b712e30

Please sign in to comment.