Showing posts with label google app engine. Show all posts
Showing posts with label google app engine. Show all posts

Sunday, January 1, 2012

Google App Engine "Error 409" Hatası Çözümü


Su hata ile karsilastim


Error 409: --- begin server output ---
Another transaction by user xxxx is already in progress for app: xxxx, version: 1. That user can undo the transaction with "appcfg rollback".
--- end server output ---

Aslinda zaten nasil cozebileceginiz cikitda yaziyor. Sadece appcfg'yi bulmaniz ve rollback komutu ile calistirmaniz gerek. Proje dizinin bir ust konumunda su sekilde calistirabilirsiniz : 



python /usr/local/bin/appcfg.py -verbose --no_cookies --email=tayyar.besik@gmail.com --passin rollback xmpp-bot

Saturday, November 27, 2010

Google App Engine Çalışmalarınızda Memcache (python)

Performans ve hız için App engine üzerinden çalışırken memcache kullanmak isteyebilrisiniz.

Python ile çalışıyorsanız bu şöye yapılıyor.


from google.appengine.api import memcache
....
...
# cache deki veriyi cekmek  
output = memcache.get("memcache-key")
# cache de varmi diye kontrol
if output is not None:
        # cache de varsa onu bas 
        print output
    else:
        # cache de yoksa veriyi cek ve cache yaz 
        output = ....
        memcache.add("memcache-key", output, 120)
        print output