Db.put () doesn't seem to work properly

I am trying to remove a list item of type long from a list of db.ListProperty (long).

class UploadHandler(blobstore_handlers.BlobstoreUploadHandler): def post(self): bla def _removeLotFromAuction(self,lot): auction = Auction.get_by_id(long(lot.auctionID)) logging.info(len(auction.lots))#1 auction.lots.remove(long(lot.lotID)) auction.put() logging.info(len(auction.lots))#0 

Then I refer to the same model (auction) later in the same request request, but Model.put () does not work, because it returns, because logging.info (len (auction.lots) returns 1

+4
source share
1 answer

This is because of possible consistency (the results that you see on the development server are modeled for the worst case, but you must develop for this case).

In article data structuring for strong consistency, there are some tips for solving this problem.

+3
source

Source: https://habr.com/ru/post/1485204/


All Articles