This is an automated email from the ASF dual-hosted git repository. btellier pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/james-project.git
commit 1d0368624ba66eecd9fd206c7d76800a2dd2b93f Author: Benoit Tellier <[email protected]> AuthorDate: Mon Mar 30 11:08:28 2020 +0700 JAMES-2813 Task executionListing is enough We already have the item in the list, we don't need an extra DB read per item to read it. --- .../org/apache/james/task/eventsourcing/EventSourcingTaskManager.scala | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/server/task/task-memory/src/main/scala/org/apache/james/task/eventsourcing/EventSourcingTaskManager.scala b/server/task/task-memory/src/main/scala/org/apache/james/task/eventsourcing/EventSourcingTaskManager.scala index 87d8d55..ad5d848 100644 --- a/server/task/task-memory/src/main/scala/org/apache/james/task/eventsourcing/EventSourcingTaskManager.scala +++ b/server/task/task-memory/src/main/scala/org/apache/james/task/eventsourcing/EventSourcingTaskManager.scala @@ -25,8 +25,8 @@ import java.util import com.google.common.annotations.VisibleForTesting import javax.annotation.PreDestroy import javax.inject.Inject -import org.apache.james.eventsourcing.{AggregateId, EventSourcingSystem, Subscriber} import org.apache.james.eventsourcing.eventstore.{EventStore, History} +import org.apache.james.eventsourcing.{AggregateId, EventSourcingSystem, Subscriber} import org.apache.james.lifecycle.api.Startable import org.apache.james.task.TaskManager.ReachedTimeoutException import org.apache.james.task._ @@ -90,7 +90,6 @@ class EventSourcingTaskManager @Inject @VisibleForTesting private[eventsourcing] private def listScala: List[TaskExecutionDetails] = executionDetailsProjection .list - .flatMap(details => executionDetailsProjection.load(details.taskId)) override def cancel(id: TaskId): Unit = { val command = RequestCancel(id) --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
