I think you are mistaken that calling Flush will help.
(I don't have the first clue how to do that. My python skills are not up to
understanding the stuff in ext.testbed)
I added this line to
google_appengine/google/appengine/datastore/datastore_stub_util.py:1483:
def Flush(self):
"""Applies all outstanding transactions."""
>> logging.info("Flush invoked")
for meta_data in self._meta_data.itervalues():
and when I click the stop sign, I see:
INFO 2011-09-07 18:41:24,460 dev_appserver_main.py:667] Server interrupted
by user, terminating
INFO 2011-09-07 18:41:24,523 datastore_stub_util.py:1483] Flush invoked
>From this I would conclude that Flush is being called, and doing so manually
>would not help.
Not being able to test with --high_replication and a persistent-across-runs
datastore is a nightmare. I can't believe I'm they only one running into this
problem.
-Joshua
On Sep 7, 2011, at 1:45 PM, Alfred Fuller wrote:
> Seems like we have to come up with a better solution. We will look into it.
>
> For now you can still call Flush() manually.
>
> On Wed, Sep 7, 2011 at 9:37 AM, Waldemar Kornewald <[email protected]>
> wrote:
> On Windows it's even worse because you can't easily kill the server
> with CTRL+C. You have to kill it the hard way using CTRL+BREAK.
>
> Also, with SDK 1.5.3 when running "manage.py shell" in Django-nonrel
> (or any other command that loads stubs without starting the
> dev_appserver) the following exception is shown on exit:
>
> Exception AttributeError: "'NoneType' object has no attribute
> 'mkstemp'" in <bound method DatastoreFileStub.__del__ of
> <google.appengine.api.datastore_file_stub.DatastoreFileStub object at
> 0x0158F5F0>> ignored
>
> That's all it says. There is no traceback. This actual exception is
> raised in DataStoreFileStub.__WritePickled(). I don't know why the
> tempfile module/global is None at that point. Something very strange
> is happening there.
>
> Bye,
> Waldemar
>
> On Tue, Sep 6, 2011 at 11:20 PM, Alfred Fuller
> <[email protected]> wrote:
> > Hmm. I have seen it work this way on my system. This is the function you
> > need have
> > invoked
> > http://code.google.com/p/googleappengine/source/browse/trunk/python/google/appengine/datastore/datastore_stub_util.py#1785
> > Does it work when you call Flush manually?
> >
> > On Tue, Sep 6, 2011 at 12:03 PM, Joshua Smith <[email protected]>
> > wrote:
> >>
> >> I don't think this is working the way you believe it is.
> >> When I run:
> >> dev_appserver.py --port=8902 --default_partition= --disable_static_caching
> >> --high_replication .
> >> and create a record, then stop with ^C, then start right back up, that
> >> record is gone.
> >> Note that ^C sends sigINT which is the same thing the STOP sign on the
> >> launcher sends.
> >> On Sep 6, 2011, at 1:45 PM, Alfred Fuller wrote:
> >>
> >> You would have to have code that only exists in your dev environment (or
> >> just never gets called in production), that grabs the stub and calls the
> >> function (see ext.testbed for examples of manipulating stubs). It would
> >> have
> >> to be triggered by a special url that you would hit right before stopping
> >> the server.
> >> It is probably much much easier to just run the dev_appserver manually and
> >> use ctrl-c to kill it.
> >>
> >> On Tue, Sep 6, 2011 at 10:27 AM, Joshua Smith <[email protected]>
> >> wrote:
> >>>
> >>> How do I call Flush() on the stub manually? Do I do this in my main.py
> >>> someplace, somehow?
> >>> On Sep 6, 2011, at 1:22 PM, Alfred Fuller wrote:
> >>>
> >>> Apparently not. I believe running the dev_appserver on a command line and
> >>> hitting Ctrl-C will work. The trick is to have the datastore stub's
> >>> destructor invoked, which doesn't happen if the app is hard stopped. You
> >>> can
> >>> also call Flush() on the stub manually.
> >>>
> >>> On Tue, Sep 6, 2011 at 10:10 AM, Joshua Smith <[email protected]>
> >>> wrote:
> >>>>
> >>>> I've updated to 1.5.3, but I still have this problem.
> >>>> How do I "shut down gracefully"? I'm shutting down by pressing the big
> >>>> red STOP button on the launcher.
> >>>> Is there another way?
> >>>> -Joshua
> >>>> On Sep 6, 2011, at 12:51 PM, Alfred Fuller wrote:
> >>>>
> >>>> If the dev_appserver is shut down gracefully, then you should not see
> >>>> this problem (as of 1.5.3).
> >>>>
> >>>> On Tue, Sep 6, 2011 at 8:40 AM, Joshua Smith <[email protected]>
> >>>> wrote:
> >>>>>
> >>>>> When I start with --high_replication to test on the dev appserver, I
> >>>>> alway seem to be starting with a blank database.
> >>>>>
> >>>>> I found this issue:
> >>>>>
> >>>>> http://code.google.com/p/googleappengine/issues/detail?id=5305
> >>>>>
> >>>>> which sounds like the problem I'm having, except that it only has 7
> >>>>> stars (including mine), and without being able to save my datastore
> >>>>> across
> >>>>> runs, debugging this thing is going to take FOREVER. So I'm thinking
> >>>>> that
> >>>>> there must be a trick I don't know.
> >>>>>
> >>>>> I ordinarily use --datastore_path so that I don't lose all my data when
> >>>>> I reboot my mac.
> >>>>>
> >>>>> I also have been using --default_partition= so I could access my data
> >>>>> when they changed the sdk a few weeks ago.
> >>>>>
> >>>>> What is the right set of options to use when testing with
> >>>>> --high_replication on the dev appserver, so that your data will be
> >>>>> present
> >>>>> across separate runs?
> >>>>>
> >>>>> -Joshua
> >>>>>
> >>>>> --
> >>>>> You received this message because you are subscribed to the Google
> >>>>> Groups "Google App Engine" group.
> >>>>> To post to this group, send email to [email protected].
> >>>>> To unsubscribe from this group, send email to
> >>>>> [email protected].
> >>>>> For more options, visit this group at
> >>>>> http://groups.google.com/group/google-appengine?hl=en.
> >>>>>
> >>>>
> >>>>
> >>>> --
> >>>> You received this message because you are subscribed to the Google
> >>>> Groups "Google App Engine" group.
> >>>> To post to this group, send email to [email protected].
> >>>> To unsubscribe from this group, send email to
> >>>> [email protected].
> >>>> For more options, visit this group at
> >>>> http://groups.google.com/group/google-appengine?hl=en.
> >>>>
> >>>>
> >>>> --
> >>>> You received this message because you are subscribed to the Google
> >>>> Groups "Google App Engine" group.
> >>>> To post to this group, send email to [email protected].
> >>>> To unsubscribe from this group, send email to
> >>>> [email protected].
> >>>> For more options, visit this group at
> >>>> http://groups.google.com/group/google-appengine?hl=en.
> >>>
> >>>
> >>> --
> >>> You received this message because you are subscribed to the Google Groups
> >>> "Google App Engine" group.
> >>> To post to this group, send email to [email protected].
> >>> To unsubscribe from this group, send email to
> >>> [email protected].
> >>> For more options, visit this group at
> >>> http://groups.google.com/group/google-appengine?hl=en.
> >>>
> >>>
> >>> --
> >>> You received this message because you are subscribed to the Google Groups
> >>> "Google App Engine" group.
> >>> To post to this group, send email to [email protected].
> >>> To unsubscribe from this group, send email to
> >>> [email protected].
> >>> For more options, visit this group at
> >>> http://groups.google.com/group/google-appengine?hl=en.
> >>
> >>
> >> --
> >> You received this message because you are subscribed to the Google Groups
> >> "Google App Engine" group.
> >> To post to this group, send email to [email protected].
> >> To unsubscribe from this group, send email to
> >> [email protected].
> >> For more options, visit this group at
> >> http://groups.google.com/group/google-appengine?hl=en.
> >>
> >> --
> >> You received this message because you are subscribed to the Google Groups
> >> "Google App Engine" group.
> >> To post to this group, send email to [email protected].
> >> To unsubscribe from this group, send email to
> >> [email protected].
> >> For more options, visit this group at
> >> http://groups.google.com/group/google-appengine?hl=en.
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google App Engine" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> > [email protected].
> > For more options, visit this group at
> > http://groups.google.com/group/google-appengine?hl=en.
> >
>
>
>
> --
> Django on App Engine, MongoDB, ...? Browser-side Python? It's open-source:
> http://www.allbuttonspressed.com/
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en.