Skip to content

Commit

Permalink
debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
lcrownover committed Oct 21, 2024
1 parent b897b6a commit bf06cec
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
4 changes: 3 additions & 1 deletion internal/api/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func PopulateCache(ctx context.Context) error {
if err != nil {
errors <- fmt.Errorf("failed to get slurmrestd %s response: %v", e.path, err)
}
apiCache.Set(e.key, data, 0)
apiCache.Set(e.name, data, 0)
}(e)
}

Expand All @@ -42,6 +42,8 @@ func PopulateCache(ctx context.Context) error {
return fmt.Errorf("errors encountered calling slurm api: %v", err)
}

slog.Debug("successfully populated cache")

return nil
}

Expand Down
1 change: 1 addition & 0 deletions internal/api/endpoints.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (

type endpoint struct {
key types.Key
name string
path string
}

Expand Down
10 changes: 5 additions & 5 deletions internal/api/endpoints_2311.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
)

var versionedEndpoints = []endpoint{
{types.ApiJobsEndpointKey, "/slurm/v0.0.40/jobs"},
{types.ApiNodesEndpointKey, "/slurm/v0.0.40/nodes"},
{types.ApiPartitionsEndpointKey, "/slurm/v0.0.40/partitions"},
{types.ApiDiagEndpointKey, "/slurm/v0.0.40/diag"},
{types.ApiSharesEndpointKey, "/slurm/v0.0.40/shares"},
{types.ApiJobsEndpointKey, "jobs", "/slurm/v0.0.40/jobs"},
{types.ApiNodesEndpointKey, "nodes", "/slurm/v0.0.40/nodes"},
{types.ApiPartitionsEndpointKey, "partitions", "/slurm/v0.0.40/partitions"},
{types.ApiDiagEndpointKey, "diag", "/slurm/v0.0.40/diag"},
{types.ApiSharesEndpointKey, "shares", "/slurm/v0.0.40/shares"},
}
10 changes: 5 additions & 5 deletions internal/api/endpoints_2405.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
)

var versionedEndpoints = []endpoint{
{types.ApiJobsEndpointKey, "/slurm/v0.0.41/jobs"},
{types.ApiNodesEndpointKey, "/slurm/v0.0.41/nodes"},
{types.ApiPartitionsEndpointKey, "/slurm/v0.0.41/partitions"},
{types.ApiDiagEndpointKey, "/slurm/v0.0.41/diag"},
{types.ApiSharesEndpointKey, "/slurm/v0.0.41/shares"},
{types.ApiJobsEndpointKey, "jobs", "/slurm/v0.0.41/jobs"},
{types.ApiNodesEndpointKey, "nodes", "/slurm/v0.0.41/nodes"},
{types.ApiPartitionsEndpointKey, "partitions", "/slurm/v0.0.41/partitions"},
{types.ApiDiagEndpointKey, "diag", "/slurm/v0.0.41/diag"},
{types.ApiSharesEndpointKey, "shares", "/slurm/v0.0.41/shares"},
}

0 comments on commit bf06cec

Please sign in to comment.