inline trivial functions

This commit is contained in:
Michael Hohn
2025-05-13 19:01:30 -07:00
committed by =Michael Hohn
parent 5bdbd60cc5
commit cf37b474e4
3 changed files with 8 additions and 22 deletions

View File

@@ -1,11 +1,5 @@
package artifactstore
import (
"fmt"
"github.com/hohn/mrvacommander/pkg/common"
)
// Restrict the keys / values for ArtifactLocation and centralize the common ones
// here
var (
@@ -17,13 +11,3 @@ type ArtifactLocation struct {
Key string // location in bucket OR full location for file paths
Bucket string // which bucket: packs or results
}
// deriveKeyFromSessionId generates a key for a query pack based on the job ID
func deriveKeyFromSessionId(sessionId int) string {
return fmt.Sprintf("%d", sessionId)
}
// deriveKeyFromJobSpec generates a key for a result based on the JobSpec
func deriveKeyFromJobSpec(jobSpec common.JobSpec) string {
return fmt.Sprintf("%d-%s", jobSpec.SessionID, jobSpec.NameWithOwner)
}