Google App Engine上的NeedIndexError永远不变 [英] NeedIndexError at Google App Engine forever

查看:183
本文介绍了Google App Engine上的NeedIndexError永远不变的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

几小时前,我在GAE部署并运行了我的应用程序。它仍然失败,因为它需要订购某个数据存储区项目,并且所需的索引仍然不是由GAE生成的。因此,在 .order()的位置,它会引发 NeedIndexError 。这需要多长时间?



过去我一直在为10〜GAE应用程序执行相同的过程,而且从来没有像我这样记忆缓慢。 (好吧,它一直很慢......)


  • 旧控制台中的数据存储索引页面只是说你还没有创建这个应用程序的索引。。

  • 新控制台什么也没说。它只是显示了一个蓝色警报,好像我并没有等待自己已经死亡。警报中的消息是:


    lockquote
    云数据存储查询由索引,可伸缩数据
    结构随着属性值的变化而实时更新。
    您项目的数据存储区索引配置指定它
    需要支持其查询的索引。当您部署索引配置时,Cloud Datastore将构建新索引,因为需要
    。您可以使用这个控制台检查应用程序索引中准备好的
    状态。


    (即笑话)



    我应该怎么做?

    更新:

    这里是index.yaml:

     索引:

    #AUTOGENERATED

    - kind:Mjquizinfo
    祖先:是
    属性:
    - 名称:版本
    方向:desc


    解决方案

    FWIW在某些情况下(例如多模块应用程序)简单 appcfg.py更新用于部署应用程序代码可能不会更新 index.yaml 文件。



    使用专门更新索引 appcfg.py update_indexes - 您应该能够立即在开发者控制台中看到索引信息(它仍然可能需要一段时间才能执行索引并生效)。

    I deployed and ran my app at GAE a few hours ago. It still fails because it needs to order certain datastore item, and the index needed for that is still not generated by GAE. So at the point of .order() it throws me a NeedIndexError. How long is this gonna take?

    I've been doing this same procedure for 10~ GAE apps in the past and it has never, to my memory, been this slow. (Ok, it has been slow...)

    • The page "Datastore Indexes" in the old console just says "You have not created indexes for this application.".
    • The new console says nothing. It just displays a "blue alert" as if I'm not waiting myself to death already. The message in the alert is:

    Cloud Datastore queries are powered by indexes, scalable data structures that are updated in real time as property values change. Your project's datastore index configuration specifies the indexes it needs to support its queries. Cloud Datastore builds new indexes as needed when you deploy index configuration. You can inspect the ready state of your app's indexes using this console.

    (ie a joke)

    What am I supposed to do?

    Update:

    here's the index.yaml:

    indexes:
    
    # AUTOGENERATED
    
    - kind: Mjquizinfo
      ancestor: yes
      properties:
      - name: version
        direction: desc
    

    解决方案

    FWIW, in some cases (multi-module apps for example) the plain appcfg.py update used to deploy the app code might not update the index.yaml file.

    Try specifically updating the index using appcfg.py update_indexes - you should be able to see the index info in the Developer Console right away (it may still take a while for indexing to be performed and become effective).

    这篇关于Google App Engine上的NeedIndexError永远不变的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆