Skip to content

Commit

Permalink
smaller review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
thoniTUB committed Nov 11, 2021
1 parent 896e095 commit 7b65c75
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,6 @@ public Stream<ExecutionStatus> getQueriesFiltered(Dataset datasetId, UriBuilder
// to exclude subtypes from somewhere else
.filter(QueryProcessor::canFrontendRender)
.filter(q -> q.getState().equals(ExecutionState.DONE) || q.getState().equals(ExecutionState.NEW))
// We decide, that if a subject owns an execution it is permitted to see it, which saves us a lot of permissions
// However, for other executions we check because those are probably shared.
.filter(q -> subject.isPermitted(q, Ability.READ))
.map(mq -> {
OverviewExecutionStatus status = mq.buildStatusOverview(
Expand Down Expand Up @@ -271,7 +269,7 @@ public void cancel(Subject subject, Dataset dataset, ManagedExecution<?> query)
return;
}

log.info("{} cancelled Query[{}]", subject, query.getId());
log.info("User[{}] cancelled Query[{}]", subject.getId(), query.getId());

final Namespace namespace = getDatasetRegistry().get(dataset.getId());

Expand All @@ -287,6 +285,7 @@ public void patchQuery(Subject subject, ManagedExecution<?> execution, MetaDataP
patch.applyTo(execution, storage, subject);
storage.updateExecution(execution);

// TODO remove this, since we don't translate anymore
// Patch this query in other datasets
List<Dataset> remainingDatasets = datasetRegistry.getAllDatasets();
remainingDatasets.remove(execution.getDataset());
Expand All @@ -304,7 +303,7 @@ public void patchQuery(Subject subject, ManagedExecution<?> execution, MetaDataP
}

public void reexecute(Subject subject, ManagedExecution<?> query) {
log.info("User[{}] reexecuted Query[{}]", subject, query);
log.info("User[{}] reexecuted Query[{}]", subject.getId(), query);

if (!query.getState().equals(ExecutionState.RUNNING)) {
datasetRegistry.get(query.getDataset().getId())
Expand Down

0 comments on commit 7b65c75

Please sign in to comment.