1 00:00:00,990 --> 00:00:02,680 All right my friends here's the moment of truth. 2 00:00:02,680 --> 00:00:07,060 We are going to manually create a ticket well then manually create an order for that ticket and then 3 00:00:07,060 --> 00:00:09,220 hopefully we're going to see that console log. 4 00:00:09,220 --> 00:00:12,370 We had put together inside of our key right here. 5 00:00:12,370 --> 00:00:16,600 We should see something immediately that says I want to publish while the while all that stuff. 6 00:00:17,260 --> 00:00:19,210 Let's open up postmen and get to it. 7 00:00:20,850 --> 00:00:25,820 I've got post band right here as usual going to want to make sure that we are signed in. 8 00:00:25,890 --> 00:00:28,600 It looks like I currently am signed in. 9 00:00:28,620 --> 00:00:31,350 That's our get request to API users current user. 10 00:00:31,590 --> 00:00:37,510 Make sure you are signed in as a person all then create a brand new ticket so this can be opposed to 11 00:00:37,540 --> 00:00:41,770 API slash tickets with the title and a price looking to send that off. 12 00:00:42,070 --> 00:00:43,000 It looks good. 13 00:00:43,000 --> 00:00:49,120 I'm going to take that I.D. And I'm going to create an order with this ticket I.D. so to create an order 14 00:00:49,750 --> 00:01:01,650 we will make a post request to HDD P.S. oh and slash slash ticketing dot Dev API orders. 15 00:01:01,860 --> 00:01:12,990 I'll go to headers but in a content type of application slash Jason I'm going to go over to body select 16 00:01:12,990 --> 00:01:18,230 raw and the only thing that we need to create a new order is the ticket I.D.. 17 00:01:18,240 --> 00:01:24,000 So I'm going to enter a Jason object right here with ticket I.D. and then paste in the idea that ticket 18 00:01:24,000 --> 00:01:27,790 that I just created remember this is Jason that we're entering. 19 00:01:27,790 --> 00:01:29,440 So make sure you get those double quotes right there. 20 00:01:29,440 --> 00:01:35,310 Also make sure that you've got a lowercase d on I.D. We'll also make sure that we've got Jason selected 21 00:01:35,320 --> 00:01:41,480 over here and that should be at they'll then go ahead and send this off I should immediately see that 22 00:01:41,480 --> 00:01:43,670 I have created a brand new order. 23 00:01:43,790 --> 00:01:45,060 Yep looks good. 24 00:01:45,440 --> 00:01:47,900 Then I'll go back over my terminal and we'll see how we are doing. 25 00:01:49,640 --> 00:01:49,870 OK. 26 00:01:49,890 --> 00:01:50,950 So over here. 27 00:01:51,030 --> 00:01:53,240 Well lot of events going on here. 28 00:01:53,430 --> 00:01:57,720 So I see in some order I see the ticket created. 29 00:01:57,850 --> 00:02:04,460 That's the reception I see a publisher of ticket created and then inside a kind of a strange order here. 30 00:02:04,490 --> 00:02:09,260 Nonetheless remember all these counts logs kind of get jumbled up because of how scaffold handles them. 31 00:02:09,260 --> 00:02:13,730 So it's kind of hard to read but we can kind of see that everything more or less worked as expected. 32 00:02:13,760 --> 00:02:16,610 So I've got an event published of order created. 33 00:02:16,790 --> 00:02:21,990 It looks like tickets received order created and expiration received order created as well. 34 00:02:23,230 --> 00:02:28,990 Expiration once it received that order created event and then created a new job and published it over 35 00:02:28,990 --> 00:02:29,910 to read. 36 00:02:30,340 --> 00:02:33,970 Because we did not put any delay on receiving or processing that event. 37 00:02:33,970 --> 00:02:39,730 We then immediately received that job back and we did a I want to publish an expiration complete event 38 00:02:39,730 --> 00:02:43,430 for order I.D. blah blah blah okay. 39 00:02:43,460 --> 00:02:49,140 So I'd say that that looks pretty good it means that we are successfully receiving the order a created 40 00:02:49,140 --> 00:02:49,740 event. 41 00:02:49,770 --> 00:02:55,380 We then successfully create the job and then we successfully received that job right then immediately 42 00:02:55,380 --> 00:02:56,730 in the future. 43 00:02:56,730 --> 00:03:01,410 The next obvious thing that we need to add inside of here is to make sure that we delay receiving this 44 00:03:01,410 --> 00:03:07,680 event or somehow put in that 15 minute delay that we do not immediately get it back this job back to 45 00:03:07,680 --> 00:03:08,390 process. 46 00:03:08,400 --> 00:03:11,820 We want to make sure we've got that 15 minute delay inside of here. 47 00:03:11,850 --> 00:03:14,230 Let's take a look at how we're going to add in that 50 minute delay. 48 00:03:14,250 --> 00:03:15,330 Pretty easy straightforward. 49 00:03:15,330 --> 00:03:16,470 We'll take care of that in just a moment.