mirror of
https://github.com/dokku/dokku.git
synced 2025-12-29 00:25:08 +01:00
fix: correct retrieval of resource values for alternative schedulers
This commit is contained in:
@@ -75,11 +75,11 @@ func GetResourceValue(appName string, processType string, resourceType string, k
|
||||
}
|
||||
|
||||
defaultValue := ""
|
||||
for key, value := range resources {
|
||||
if key == propertyKey("_default_", resourceType, key) {
|
||||
for k, value := range resources {
|
||||
if k == propertyKey("_default_", resourceType, key) {
|
||||
defaultValue = value
|
||||
}
|
||||
if key == propertyKey(processType, resourceType, key) {
|
||||
if k == propertyKey(processType, resourceType, key) {
|
||||
return value, nil
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,8 +14,8 @@ func main() {
|
||||
flag.Parse()
|
||||
appName := flag.Arg(0)
|
||||
processType := flag.Arg(1)
|
||||
resourceType := flag.Arg(1)
|
||||
key := flag.Arg(1)
|
||||
resourceType := flag.Arg(2)
|
||||
key := flag.Arg(3)
|
||||
|
||||
value, err := resource.GetResourceValue(appName, processType, resourceType, key)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user