|
| force |
|
| confirmation_fn |
|
| rpcserver |
|
| error_fh |
|
Provide facilities to request the deletion of datastore indexes.
def google.appengine.tools.appcfg.VacuumIndexesOperation.__init__ |
( |
|
self, |
|
|
|
rpcserver, |
|
|
|
force, |
|
|
|
confirmation_fn = raw_input , |
|
|
|
error_fh = sys.stderr |
|
) |
| |
Creates a new VacuumIndexesOperation.
Args:
rpcserver: The RPC server to use. Should be an instance of HttpRpcServer
or TestRpcServer.
force: True to force deletion of indexes, else False.
confirmation_fn: Function used for getting input form user.
error_fh: Where to send status and error messages.
def google.appengine.tools.appcfg.VacuumIndexesOperation.DoVacuum |
( |
|
self, |
|
|
|
definitions |
|
) |
| |
Vacuum indexes in datastore.
This method will query the server to determine which indexes are not
being used according to the user's local index.yaml file. Once it has
made this determination, it confirms with the user which unused indexes
should be deleted. Once confirmation for each index is receives, it
deletes those indexes.
Because another user may in theory delete the same indexes at the same
time as the user, there is a potential race condition. In this rare cases,
some of the indexes previously confirmed for deletion will not be found.
The user is notified which indexes these were.
Args:
definitions: datastore_index.IndexDefinitions as loaded from users
index.yaml file.
def google.appengine.tools.appcfg.VacuumIndexesOperation.GetConfirmation |
( |
|
self, |
|
|
|
index |
|
) |
| |
Get confirmation from user to delete an index.
This method will enter an input loop until the user provides a
response it is expecting. Valid input is one of three responses:
y: Confirm deletion of index.
n: Do not delete index.
a: Delete all indexes without asking for further confirmation.
If the user enters nothing at all, the default action is to skip
that index and do not delete.
If the user selects 'a', as a side effect, the 'force' flag is set.
Args:
index: Index to confirm.
Returns:
True if user enters 'y' or 'a'. False if user enter 'n'.
The documentation for this class was generated from the following file:
- code/googleappengine-read-only/python/google/appengine/tools/appcfg.py