App Engine Python SDK  v1.6.9 rev.445
The Python runtime is available as an experimental Preview feature.
Public Member Functions | Public Attributes | List of all members
google.appengine.tools.bulkloader._ThreadBase Class Reference
Inheritance diagram for google.appengine.tools.bulkloader._ThreadBase:
google.appengine.tools.bulkloader._ProgressThreadBase google.appengine.tools.bulkloader.DataSourceThread google.appengine.tools.bulkloader.RestoreThread google.appengine.tools.bulkloader.ExportProgressThread google.appengine.tools.bulkloader.MapperProgressThread google.appengine.tools.bulkloader.ProgressTrackerThread

Public Member Functions

def __init__
 
def run
 
def SetError
 
def PerformWork
 
def CheckError
 
def GetFriendlyName
 

Public Attributes

 exit_flag
 
 error
 
 traceback
 

Detailed Description

Provide some basic features for the threads used in the uploader.

This abstract base class is used to provide some common features:

* Flag to ask thread to exit as soon as possible.
* Record exit/error status for the primary thread to pick up.
* Capture exceptions and record them for pickup.
* Some basic logging of thread start/stop.
* All threads are "daemon" threads.
* Friendly names for presenting to users.

Concrete sub-classes must implement PerformWork().

Either self.NAME should be set or GetFriendlyName() be overridden to
return a human-friendly name for this thread.

The run() method starts the thread and prints start/exit messages.

self.exit_flag is intended to signal that this thread should exit
when it gets the chance.  PerformWork() should check self.exit_flag
whenever it has the opportunity to exit gracefully.

Member Function Documentation

def google.appengine.tools.bulkloader._ThreadBase.CheckError (   self)
If an error is present, then log it.
def google.appengine.tools.bulkloader._ThreadBase.GetFriendlyName (   self)
Returns a human-friendly description of the thread.
def google.appengine.tools.bulkloader._ThreadBase.PerformWork (   self)
Perform the thread-specific work.
def google.appengine.tools.bulkloader._ThreadBase.run (   self)
Perform the work of the thread.
def google.appengine.tools.bulkloader._ThreadBase.SetError (   self)
Sets the error and traceback information for this thread.

This must be called from an exception handler.

The documentation for this class was generated from the following file: