+ "; synthesizeHistory=" + task.getSettings().getSynthesizeHistory());
enqueueTasks(ImmutableList.of(payload));
} else if ("canceltasks".equals(action)) {
log.info("Cancelling all tasks for " + userId);
try {
new RetryHelper().run(new RetryHelper.VoidBody() {
@Override public void run() throws RetryableFailure, PermanentFailure {
CheckedTransaction tx = datastore.get().beginTransaction();
try {
if (perUserTable.get().deleteAllTasks(tx, userId)) {
tx.commit();
}
} finally {
tx.close();
}
}
});
} catch (PermanentFailure e) {
throw new IOException("Failed to delete tasks", e);
}
} else if ("forgetwaves".equals(action)) {
log.info("Forgetting all waves for " + userId);
try {
new RetryHelper().run(new RetryHelper.VoidBody() {
@Override public void run() throws RetryableFailure, PermanentFailure {
CheckedTransaction tx = datastore.get().beginTransaction();
try {
if (perUserTable.get().deleteAllWaves(tx, userId)) {
tx.commit();