adamsaghy commented on code in PR #2891:
URL: https://github.com/apache/fineract/pull/2891#discussion_r1072383085


##########
fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/repository/ExternalEventRepository.java:
##########
@@ -19,19 +19,25 @@
 package org.apache.fineract.infrastructure.event.external.repository;
 
 import java.time.LocalDate;
+import java.time.OffsetDateTime;
 import java.util.List;
 import 
org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEvent;
 import 
org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEventStatus;
+import 
org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEventView;
 import org.springframework.data.domain.Pageable;
 import org.springframework.data.jpa.repository.JpaRepository;
 import org.springframework.data.jpa.repository.Modifying;
 import org.springframework.data.jpa.repository.Query;
 
 public interface ExternalEventRepository extends JpaRepository<ExternalEvent, 
Long> {
 
-    List<ExternalEvent> findByStatusOrderById(ExternalEventStatus status, 
Pageable batchSize);
+    List<ExternalEventView> findByStatusOrderById(ExternalEventStatus status, 
Pageable batchSize);
 
     @Modifying(flushAutomatically = true)
     @Query("delete from ExternalEvent e where e.status = :status and 
e.businessDate <= :dateForPurgeCriteria")
     void deleteOlderEventsWithSentStatus(ExternalEventStatus status, LocalDate 
dateForPurgeCriteria);
+
+    @Modifying

Review Comment:
   Can it happen to fetch the "not yet sent" events again from the DB before 
this async event sending logic got executed for all of the events?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to