Oh if it helps the exact error message:

<class 'google.appengine.runtime.DeadlineExceededError'>:
Traceback (most recent call last):
  File "/base/data/home/apps/my-app/1.337029206592219112/
gaehandler.py", line 69, in <module>
    main()
  File "/base/data/home/apps/my-app/1.337029206592219112/
gaehandler.py", line 65, in main
    wsgiref.handlers.CGIHandler().run(wsgiapp)
  File "/base/python_dist/lib/python2.5/wsgiref/handlers.py", line 92,
in run
    self.result = application(self.environ, self.start_response)
  File "/base/data/home/apps/my-app/1.337029206592219112/
gaehandler.py", line 59, in wsgiapp
    return gluon.main.wsgibase(env, res)
  File "/base/data/home/apps/my-app/1.337029206592219112/gluon/
main.py", line 466, in wsgibase
    ticket = e.log(request)
  File "/base/data/home/apps/my-app/1.337029206592219112/gluon/
restricted.py", line 148, in log
    ticket_storage.store(request, f, d)
  File "/base/data/home/apps/my-app/1.337029206592219112/gluon/
restricted.py", line 49, in store
    self._store_in_db(request, ticket_id, ticket_data)
  File "/base/data/home/apps/my-app/1.337029206592219112/gluon/
restricted.py", line 57, in _store_in_db
    created_datetime=request.now)
  File "/base/data/home/apps/my-app/1.337029206592219112/gluon/contrib/
gql.py", line 240, in insert
    self._db['_lastsql'] = 'insert'
  File "/base/data/home/apps/my-app/1.337029206592219112/gluon/
sql.py", line 1241, in __getattr__
    def __getattr__(self, key):
<class 'google.appengine.runtime.DeadlineExceededError'>:

On Oct 14, 9:53 am, Chris S <[email protected]> wrote:
> That was 'better' but same problem.  With the change you've given it
> still errors out but 199 deletions were performed (previously nothing
> was deleted).  It's not good but at least it's deleting something
> until there is a better solution.
>
> On Oct 14, 9:39 am, mdipierro <[email protected]> wrote:
>
> > Not sure. Try this:
>
> > myset=db(db.item2.id>0)
> > while myset.delete(): pass
>
> > Massimo
>
> > On Oct 14, 9:29 am, Chris S <[email protected]> wrote:
>
> > > Setting up Cron jobs on GAE is simple enough.  But I'm not
> > > understanding something with creating a cron that can delete table
> > > entries.
>
> > > I was attempting to make the cron remove all items in a selection
> > > with:
> > > db.delete(sqldb.item2)
> > > return 'Delete complete'
>
> > > The problem is it fetches the 1000 limit and deleting that many items
> > > exceeds the 30-second process limit on GAE.
>
> > > So I was trying to reduce the number of items deleted in each cron
> > > with:
> > > rows=db.(db.item2.id>0).select(limitby=(0,200))
>
> > > That returns a row object which doesn't seem to take the delete
> > > command.  Only a 'set' can be called with delete.
> > > myset=db(db.item2.id>0)
> > > myset.delete()
>
> > > This works just fine as far as deleting goes, but the set can't be
> > > limited like the selection can.
>
> > > I'm sure I'm just missing something, but how do I perform a delete
> > > command on something other than the max allowed selection of 1000?
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" 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/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to