new RetryHelper.VoidBody() {
@Override public void run() throws RetryableFailure, PermanentFailure {
CheckedTransaction tx = datastore.beginTransaction();
try {
for (RobotSearchDigest result : partition) {
FindWaveletsForRemoteWaveTask task = new FindWaveletsForRemoteWaveTaskGsonImpl();
task.setInstance(instance.serialize());
task.setWaveDigest(result);
if (autoImportSettings != null) {
task.setAutoImportSettings(autoImportSettings);
}
ImportTaskPayload payload = new ImportTaskPayloadGsonImpl();
payload.setFindWaveletsTask(task);
perUserTable.addTask(tx, userId, payload);
}