Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7778445
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T18:23:55+00:00 2026-06-01T18:23:55+00:00

I am doing a NDB query, which seems to only be fetching a partial

  • 0

I am doing a NDB query, which seems to only be fetching a partial object. For the Model, I’ve turned off caching, in case that was it. However, a number of properties are coming back with None, when I can see them filled in the Datastore Viewer.

This is with the local development server ( and deployed), and the query is being done by a Backend process.

Note: Clearing the memcache did not help.

NOTE: If I cause the backend to restart, it will start pulling down the correct data.

Basically:

Backend starts querying for instances of a Model every X seconds

Frontend causes a change to an instance of the Model

Backend continues to see the original version of the instance until restarted

Backend code is pretty simple:

while 1:
    time.sleep(2)
    q = None
    res = None
    q = core.Agent.query()
    res = q.fetch(10)
    for a in res:
        logging.error("%s" % a.to_dict())

Frontend changes some properties (and it shows in the viewer) but the backend will only show old values. It also seems like a Filter will filter based on correct values, but fetch() returns old stuff.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T18:23:56+00:00Added an answer on June 1, 2026 at 6:23 pm

    You need to clear the context cache at the top of the loop, e.g.

    while 1:
      ndb.get_context().clear_cache()
      <rest of your code>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Doing some homework here (second assignment, still extremely green...). The object is to read
Doing a mysqli query and COUNTing the results, is there a preferred comparison operator
Doing code analysis of the project and get the message Reference-counted object is used
Doing a search using django-sphinx gives me results._sphinx that says there were 68 results,
Doing a small project I have received some Java code that I should rewrite
Doing some code reviews lately I came across a number of classes that have
Doing a couple rotations in Matlab, one which is rotation about the y-axis, however
doing some jQuery animation for a high profile client that has to be finished
Doing a little search i realized that to make an equalizer. I need to
Doing some profiling (mem & speed) I've been stomped by the fact that win7

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.