| Line 70... |
Line 70... |
| 70 |
// Spawning a thread to capture shipment updates from Bluedart
|
70 |
// Spawning a thread to capture shipment updates from Bluedart
|
| 71 |
// This is done to ensure that response from Crm web app is sent
|
71 |
// This is done to ensure that response from Crm web app is sent
|
| 72 |
// within given time limits. Also, we wont be affected in the cases
|
72 |
// within given time limits. Also, we wont be affected in the cases
|
| 73 |
// where bluedart site is down or slow
|
73 |
// where bluedart site is down or slow
|
| 74 |
Executors.newSingleThreadExecutor().invokeAll(Collections.singletonList(new Callable<Boolean>() {
|
74 |
Executors.newSingleThreadExecutor().invokeAll(Collections.singletonList(new Callable<Boolean>() {
|
| 75 |
@Override
|
- |
|
| 76 |
public Boolean call() throws Exception {
|
75 |
public Boolean call() throws Exception {
|
| 77 |
shipmentUpdates = blueDartTrackingService.getUpdates(order.getAirwaybill_no());
|
76 |
shipmentUpdates = blueDartTrackingService.getUpdates(order.getAirwaybill_no());
|
| 78 |
return true;
|
77 |
return true;
|
| 79 |
}
|
78 |
}
|
| 80 |
}), 5, TimeUnit.SECONDS);
|
79 |
}), 5, TimeUnit.SECONDS);
|