Merge pull request #4218 from dhiltgen/auto_parallel

Enable concurrency by default
This commit is contained in:
Daniel Hiltgen
2024-07-01 08:32:29 -07:00
committed by GitHub
7 changed files with 175 additions and 73 deletions

View File

@@ -1237,6 +1237,11 @@ func (s *Server) ProcessHandler(c *gin.Context) {
models = append(models, mr)
}
slices.SortStableFunc(models, func(i, j api.ProcessModelResponse) int {
// longest duration remaining listed first
return cmp.Compare(j.ExpiresAt.Unix(), i.ExpiresAt.Unix())
})
c.JSON(http.StatusOK, api.ProcessResponse{Models: models})
}