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 7074849
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:06:26+00:00 2026-05-28T06:06:26+00:00

webapp.RequestHandler based Handlers can override initialize () to carry out setup. Is there a

  • 0

webapp.RequestHandler based Handlers can override initialize () to carry out setup. Is there a similar finalize() ? Could I override del() to achieve this ?

Basically, I am looking to making some journal entries after the post/get functions have completed such that this is not in the critical path of the Response back to the browser..

I could either (1) do this in this ‘finalize’ call assuming it is called after the Response is flushed to the browser or (2) push the work on a separate thread-pool-queue. If there is a way to do former, that would be a lot easier/simpler.

Thanks.

  • 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-05-28T06:06:27+00:00Added an answer on May 28, 2026 at 6:06 am

    You could override __del__, but this is dangerous (can introduce GC loops and uncollectable objects), and doesn’t gain you anything.

    You don’t gain anything because the App Engine runtime does not return the response to the user until the WSGI application has returned, which does not happen until all user code has finished executing. Likewise, threads on a frontend cannot run longer than the scope of the request for which they were created.

    If you want to do work outside the scope of a request, you should use the Task Queue.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a class that doesn't extend webapp.RequestHandler , and I can't use self.response.out.write()
class GuestBook(webapp.RequestHandler): def post(self): self.response.out.write( '<h2>You wrote:</h2> %s' %self.request.get('content') ) I want to pass
('/\d+\?fmt=json',JsonHandler) class JsonHandler(webapp.RequestHandler): def get(self): self.response.out.write(hello) Hey, I am using google app engine python
In GAE Python, I could use class MyRequestHandler(webapp.RequestHandler): def get(self): pass #Do Something... def
I have something like this set up: class CategoryPage (webapp.RequestHandler): def get(self): ** DO
I think I'm using the Users API incorrectly: class BaseHandler(webapp.RequestHandler): user = users.get_current_user() def
class sss(webapp.RequestHandler): def get(self): url = http://www.google.com/ result = urlfetch.fetch(url) if result.status_code == 200:
i use modified webapp.RequestHandler for handling requests in my app: class MyRequestHandler(webapp.RequestHandler): Request handler
take this example from google docs class BrowseHandler(webapp.RequestHandler): > def get(self, category, product_id): >
class FirstModel(db.Model): p = db.StringProperty() r=db.ReferenceProperty(SecondModel) class SecondModel(db.Model): r = db.ReferenceProperty(FirstModel) class sss(webapp.RequestHandler): def

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.