mirror of https://github.com/perkeep/perkeep.git
appengine: more fixes
-added status handler to the config -made pkg/jsonconfig/eval.go use the relative path for the config file, since appengine does not like absolute paths. Change-Id: If9d275e308ae60e15ecd9c831e22fa6301de0be6
This commit is contained in:
parent
e682cda008
commit
f66077e48b
|
@ -84,17 +84,17 @@ func (c *ConfigParser) ReadFile(path string) (m map[string]interface{}, err erro
|
|||
// Decodes and evaluates a json config file, watching for include cycles.
|
||||
func (c *ConfigParser) recursiveReadJSON(configPath string) (decodedObject map[string]interface{}, err error) {
|
||||
|
||||
configPath, err = filepath.Abs(configPath)
|
||||
absConfigPath, err := filepath.Abs(configPath)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("Failed to expand absolute path for %s", configPath)
|
||||
}
|
||||
if c.touchedFiles[configPath] {
|
||||
if c.touchedFiles[absConfigPath] {
|
||||
return nil, fmt.Errorf("ConfigParser include cycle detected reading config: %v",
|
||||
configPath)
|
||||
absConfigPath)
|
||||
}
|
||||
c.touchedFiles[configPath] = true
|
||||
c.touchedFiles[absConfigPath] = true
|
||||
|
||||
c.includeStack.Push(configPath)
|
||||
c.includeStack.Push(absConfigPath)
|
||||
defer c.includeStack.Pop()
|
||||
|
||||
var f File
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
"handlerArgs": {
|
||||
"ownerName": "TODO:AppEngineOwnerName",
|
||||
"blobRoot": "/bs-and-maybe-also-index/",
|
||||
"statusRoot": "/status/",
|
||||
"searchRoot": "/my-search/",
|
||||
"stealth": false
|
||||
}
|
||||
|
@ -20,6 +21,10 @@
|
|||
}
|
||||
},
|
||||
|
||||
"/status/": {
|
||||
"handler": "status"
|
||||
},
|
||||
|
||||
"/bs-and-maybe-also-index/": {
|
||||
"handler": "storage-cond",
|
||||
"handlerArgs": {
|
||||
|
|
Loading…
Reference in New Issue