You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by bt...@apache.org on 2020/04/01 03:32:56 UTC
[james-project] 05/14: JAMES-2813 Task executionListing is enough
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 <bt...@linagora.com>
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: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org