| Line 7... |
Line 7... |
| 7 |
import in.shop2020.thrift.clients.CatalogClient;
|
7 |
import in.shop2020.thrift.clients.CatalogClient;
|
| 8 |
|
8 |
|
| 9 |
import java.io.File;
|
9 |
import java.io.File;
|
| 10 |
import java.io.IOException;
|
10 |
import java.io.IOException;
|
| 11 |
import java.util.ArrayList;
|
11 |
import java.util.ArrayList;
|
| - |
|
12 |
import java.util.Arrays;
|
| 12 |
import java.util.List;
|
13 |
import java.util.List;
|
| 13 |
|
14 |
|
| 14 |
import net.sf.ehcache.CacheManager;
|
15 |
import net.sf.ehcache.CacheManager;
|
| 15 |
|
16 |
|
| 16 |
import org.apache.log4j.Logger;
|
17 |
import org.apache.log4j.Logger;
|
| Line 85... |
Line 86... |
| 85 |
log.info("Getting latest arrivals from snippets.");
|
86 |
log.info("Getting latest arrivals from snippets.");
|
| 86 |
in.shop2020.model.v1.catalog.InventoryService.Client client = catalogClientService.getClient();
|
87 |
in.shop2020.model.v1.catalog.InventoryService.Client client = catalogClientService.getClient();
|
| 87 |
try {
|
88 |
try {
|
| 88 |
this.setTotalItems(client.getLatestArrivalsCount());
|
89 |
this.setTotalItems(client.getLatestArrivalsCount());
|
| 89 |
showcasePageSnippetsCache.put(SHOWCASE_LATEST_ARRIVALS_COUNT_CACHE_KEY, this.totalItems);
|
90 |
showcasePageSnippetsCache.put(SHOWCASE_LATEST_ARRIVALS_COUNT_CACHE_KEY, this.totalItems);
|
| 90 |
this.items = client.getLatestArrivalsCatalogIds(beginIndex, windowSize, null, new ArrayList<Long>());
|
91 |
this.items = client.getLatestArrivalsCatalogIds(beginIndex, windowSize, null, Arrays.asList(new Long[]{10002L, 10003L, 10010L}));
|
| 91 |
setSnippets();
|
92 |
setSnippets();
|
| 92 |
showcasePageSnippetsCache.put(SHOWCASE_LATEST_ARRIVALS_CACHE_KEY + beginIndex, this.snippets);
|
93 |
showcasePageSnippetsCache.put(SHOWCASE_LATEST_ARRIVALS_CACHE_KEY + beginIndex, this.snippets);
|
| 93 |
} catch (InventoryServiceException e) {
|
94 |
} catch (InventoryServiceException e) {
|
| 94 |
log.error("Unable to get latest arrivals from inventory service.", e);
|
95 |
log.error("Unable to get latest arrivals from inventory service.", e);
|
| 95 |
} catch (TException e) {
|
96 |
} catch (TException e) {
|