google app engine - Local GAE Datastore is empty after restart on OSX -


i'm building google app engine application go backend + polymer frontend. result, i'm using dispatch.yaml file serve both @ same time.

the problem i'm facing datastore empty when restart computer. i've tested on both osx 10.9.5 , 10.10.4. both exhibit same response upon system reboot. windows 7, however, seems hold on data.

the documentation suggests data should persist, since i'm not explicitly calling clear. it's not. i've tried set datastore location myself using this:

dev_appserver.py --datastore_path=~/go_apps/data ~/go_apps/my_app 

i'm receiving error:

google.appengine.tools.devappserver2.errors.appconfignotfounderror: "/users/anthony/go_apps/my_app directory not contain app.yaml or app.yml 

obviously, since i'm using dispatch.yaml file, wouldn't. so, since backend, handles data, have app.yaml file, try set there. use command:

dev_appserver.py --datastore_path=~/go_apps/data ~/go_apps/my_app/backend 

that doesn't seem work either, error:

sqlite3.operationalerror: unable open database file 

okay? well, not sure turn now. gather other posts, data stored temporarily. but, can't seem set custom, non-temporary location data. so, i'm populating datastore every time reboot, seems ridiculous.

* edit *

i've tried following, seems tries launch app, , creates datastore.db file @ correct location:

dev_appserver.py --datastore_path ~/go_apps/my_app/data/datastore.db  ~/go_apps/my_app/dispatch.yaml ~/go_apps/my_app/backend/app.yaml ~/go_apps/my_app/frontend/app.yaml 

however, i'm getting weird error now:

/var/folders/04/3hxnpxc15wj2k4v40lkdncd00000gn/t/tmpkcqynfappengine-go-bin/backend.go:13: can't find import: "github.com/gorilla/mux" 

does go build folder temporarily? import available, , builds fine calling goapp serve.

here imports on backend.go

import (     //standard library     "fmt"     "net/http"     "time"     "log"      //third party     "github.com/gorilla/mux"     "github.com/gorilla/securecookie"     "github.com/dgrijalva/jwt-go"     "golang.org/x/crypto/bcrypt"      //my imports     "github.com/section14/go_polymer_comm_pkg/controller" ) 

you have pass name of file used persisted datastore, not folder.

and next provide folder of app (which contains app.yaml). don't mix 2. should like:

dev_appserver.py --datastore_path=~/my_app/my_app.db ~/go_apps/my_app 

details can found here:

the go development server / using datastore

notes:

the default datastore file in temp folder, , os-x clears on system restart, that's why not preserved you. on other hand windows 7 example not clear temp folder on system restarts.


Comments

Popular posts from this blog

dns - How To Use Custom Nameserver On Free Cloudflare? -

python - Pygame screen.blit not working -

c# - Web API response xml language -