When EventScanner running, it will first find the timeout event and save it 
into timeoutRepository. 
And then, it calls `abortTimeoutEvents` to get the events that just save. 
Maybe it would  be better if we merged these two steps.  If i follow that,is it 
will destroy the principle that a function only completes one task?

```Java
private void pollEvents() {
    scheduler.scheduleWithFixedDelay(
        () -> {
          updateTimeoutStatus();
          findTimeoutEvents();
          abortTimeoutEvents();
          saveUncompensatedEventsToCommands();
          compensate();
          updateCompensatedCommands();
          deleteDuplicateSagaEndedEvents();
          updateTransactionStatus();
        },
        0,
        eventPollingInterval,
        MILLISECONDS);
  }
```


    

[ Full content available at: 
https://github.com/apache/incubator-servicecomb-saga/issues/309 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to