def DeleteEntity(key):
 if (key.kind() in MAPREDUCE_OBJECTS):
  entity = datastore.Get(key)
  if (entity and (not entity['active'])):
   (yield operation.db.Delete(key))
 elif (key.kind() == utils.DatastoreAdminOperation.kind()):
  entity = datastore.Get(key)
  if (entity and (not entity['active_jobs'])):
   (yield operation.db.Delete(key))
 else:
  (yield operation.db.Delete(key))

def DeleteEntity ( key ) : if ( key . kind ( ) in MAPREDUCE_OBJECTS ) : entity = datastore . Get ( key ) if ( entity and ( not entity [ 'active' ] ) ) : ( yield operation . db . Delete ( key ) ) elif ( key . kind ( ) == utils . DatastoreAdminOperation . kind ( ) ) : entity = datastore . Get ( key ) if ( entity and ( not entity [ 'active_jobs' ] ) ) : ( yield operation . db . Delete ( key ) ) else : ( yield operation . db . Delete ( key ) )
delete function which deletes all processed entities .