Skip to content

Commit 0febe57

Browse files
committed
update starter
Signed-off-by: Tihomir Surdilovic <[email protected]>
1 parent 819b3f9 commit 0febe57

File tree

1 file changed

+4
-0
lines changed
  • core/src/main/java/io/temporal/samples/packetdelivery

1 file changed

+4
-0
lines changed

core/src/main/java/io/temporal/samples/packetdelivery/Starter.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import io.temporal.serviceclient.WorkflowServiceStubs;
88
import io.temporal.worker.Worker;
99
import io.temporal.worker.WorkerFactory;
10+
import java.util.Collections;
1011
import java.util.List;
1112

1213
public class Starter {
@@ -36,10 +37,13 @@ public static void main(String[] args) {
3637
// more
3738
while (true) {
3839
sleep(3);
40+
// for "fun", reverse the list we get from delivery confirmation list
3941
List<Packet> packets = workflow.deliveryConfirmationPackets();
4042
if (packets.isEmpty()) {
4143
break;
4244
}
45+
// for "fun", reverse the list we get from delivery confirmation list
46+
Collections.reverse(packets);
4347

4448
for (Packet p : packets) {
4549
try {

0 commit comments

Comments
 (0)