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._WorkItem Class Reference
Inheritance diagram for google.appengine.tools.bulkloader._WorkItem:
google.appengine.tools.adaptive_thread_pool.WorkItem google.appengine.tools.bulkloader.KeyRangeItem google.appengine.tools.bulkloader.UploadWorkItem google.appengine.tools.bulkloader.DownloadItem google.appengine.tools.bulkloader.MapperItem

Public Member Functions

def __init__
 
def SetError
 
def PerformWork
 
def MarkAsRead
 
def MarkAsTransferring
 
def MarkAsTransferred
 
def MarkAsError
 
- Public Member Functions inherited from google.appengine.tools.adaptive_thread_pool.WorkItem
def __init__
 
def PerformWork
 
def __str__
 

Public Attributes

 progress_queue
 
 state_namer
 
 state
 
 progress_key
 
 progress_event
 
 key_start
 
 key_end
 
 error
 
 traceback
 
 kind
 

Additional Inherited Members

- Static Public Attributes inherited from google.appengine.tools.adaptive_thread_pool.WorkItem
string SUCCESS = 'success'
 
string RETRY = 'retry'
 
string FAILURE = 'failure'
 

Detailed Description

Holds a description of a unit of upload or download work.

Constructor & Destructor Documentation

def google.appengine.tools.bulkloader._WorkItem.__init__ (   self,
  progress_queue,
  key_start,
  key_end,
  state_namer,
  state = STATE_READ,
  progress_key = None 
)
Initialize the _WorkItem instance.

Args:
  progress_queue: A queue used for tracking progress information.
  key_start: The start key of the work item.
  key_end: The end key of the work item.
  state_namer: Function to describe work item states.
  state: The initial state of the work item.
  progress_key: If this WorkItem represents state from a prior run,
then this will be the key within the progress database.

Member Function Documentation

def google.appengine.tools.bulkloader._WorkItem.MarkAsError (   self)
Mark this _WorkItem as failed, updating the progress database.
def google.appengine.tools.bulkloader._WorkItem.MarkAsRead (   self)
Mark this _WorkItem as read, updating the progress database.
def google.appengine.tools.bulkloader._WorkItem.MarkAsTransferred (   self)
Mark this _WorkItem as transferred, updating the progress database.
def google.appengine.tools.bulkloader._WorkItem.MarkAsTransferring (   self)
Mark this _WorkItem as transferring, updating the progress database.
def google.appengine.tools.bulkloader._WorkItem.PerformWork (   self,
  thread_pool 
)
Perform the work of this work item and report the results.

Args:
  thread_pool: An AdaptiveThreadPool instance.

Returns:
  A tuple (status, instruction) of the work status and an instruction
  for the ThreadGate.
def google.appengine.tools.bulkloader._WorkItem.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: