You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by "chibenwa (via GitHub)" <gi...@apache.org> on 2023/04/21 03:25:06 UTC

[GitHub] [james-project] chibenwa commented on a diff in pull request #1533: JAMES-3900 Snapshots for polled updates

chibenwa commented on code in PR #1533:
URL: https://github.com/apache/james-project/pull/1533#discussion_r1173268219


##########
server/task/task-memory/src/main/scala/org/apache/james/task/eventsourcing/DecisionProjection.scala:
##########
@@ -32,7 +32,7 @@ case class DecisionProjection(status: Status, latestUpdateAdditionalInformationU
         case event: Cancelled => DecisionProjection(Status.CANCELLED, event.additionalInformation.map(_.timestamp))
         case event: Completed => DecisionProjection(Status.COMPLETED, event.additionalInformation.map(_.timestamp))
         case event: Failed => DecisionProjection(Status.FAILED, event.additionalInformation.map(_.timestamp))
-        case event: AdditionalInformationUpdated => DecisionProjection(status, Some(event.additionalInformation.timestamp))
+        case event: AdditionalInformationUpdated => DecisionProjection(Status.IN_PROGRESS, Some(event.additionalInformation.timestamp))

Review Comment:
   > I think I get the change, but what's the point of keeping status as an argument to the method update then?
   
   Status is not an argument of the update method but part of the state of DecisionProjection and as such we need it.
   
   This change is that the event fully determines the Decision projection disregardless of previous state (prerequisite for snapshot) but do not change the fact that status is needed to take a decision.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org