From f66077e48b1186d33622e16f44c0fd83a9db6c05 Mon Sep 17 00:00:00 2001 From: mpl Date: Sun, 11 Aug 2013 21:16:37 +0200 Subject: [PATCH] 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 --- pkg/jsonconfig/eval.go | 10 +++++----- server/appengine/config.json | 5 +++++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/pkg/jsonconfig/eval.go b/pkg/jsonconfig/eval.go index 7d4fec937..bccb50681 100644 --- a/pkg/jsonconfig/eval.go +++ b/pkg/jsonconfig/eval.go @@ -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 diff --git a/server/appengine/config.json b/server/appengine/config.json index c35c66db7..d88c8f4f5 100644 --- a/server/appengine/config.json +++ b/server/appengine/config.json @@ -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": {