| Line 359... |
Line 359... |
| 359 |
System.out.println();
|
359 |
System.out.println();
|
| 360 |
}
|
360 |
}
|
| 361 |
}
|
361 |
}
|
| 362 |
System.out.println(response.getResponseHeaderMetadata());
|
362 |
System.out.println(response.getResponseHeaderMetadata());
|
| 363 |
retry =true;
|
363 |
retry =true;
|
| 364 |
System.out.println("============Sleeping For 10 Minutes=============");
|
364 |
System.out.println("============Sleeping For 5 Minutes=============");
|
| 365 |
Thread.sleep(600000);
|
365 |
Thread.sleep(300000);
|
| 366 |
CheckFeedSubmission checkResult = new CheckFeedSubmission();
|
366 |
CheckFeedSubmission checkResult = new CheckFeedSubmission();
|
| 367 |
ProcessFeed feedProcessingResult=null;
|
367 |
ProcessFeed feedProcessingResult=null;
|
| 368 |
int checkResultCount=0;
|
368 |
int checkResultCount=0;
|
| 369 |
try {
|
369 |
try {
|
| 370 |
while (feedProcessingResult == null){
|
370 |
while (feedProcessingResult == null){
|
| 371 |
feedProcessingResult = checkResult.getResult(feedSubmissionInfo.getFeedSubmissionId(),"FullFbaPricing",milliseconds,itemIdsToUpdate);
|
371 |
feedProcessingResult = checkResult.getResult(feedSubmissionInfo.getFeedSubmissionId(),"FullFbaPricing",milliseconds,itemIdsToUpdate);
|
| 372 |
if (feedProcessingResult == null){
|
372 |
if (feedProcessingResult == null){
|
| 373 |
checkResultCount++;
|
373 |
checkResultCount++;
|
| 374 |
if (checkResultCount == 5){
|
374 |
if (checkResultCount == 2){
|
| 375 |
String text = "";
|
375 |
String text = "";
|
| 376 |
String[] sendTo = { "eng@shop2020.in" };
|
376 |
String[] sendTo = { "eng@shop2020.in" };
|
| 377 |
String emailSubjectTxt = "Unable To Receive FBA Pricing Feed Result.Submission Id "+feedSubmissionInfo.getFeedSubmissionId();
|
377 |
String emailSubjectTxt = "Unable To Receive FBA Pricing Feed Result.Submission Id "+feedSubmissionInfo.getFeedSubmissionId();
|
| 378 |
String emailFromAddress = "build@shop2020.in";
|
378 |
String emailFromAddress = "build@shop2020.in";
|
| 379 |
String password = "cafe@nes";
|
379 |
String password = "cafe@nes";
|
| Line 515... |
Line 515... |
| 515 |
overridecurrencyamount.setCurrency(BaseCurrencyCodeWithDefault.DEFAULT);
|
515 |
overridecurrencyamount.setCurrency(BaseCurrencyCodeWithDefault.DEFAULT);
|
| 516 |
overridecurrencyamount.setValue(BigDecimal.valueOf(AItem.getFbaPrice()));
|
516 |
overridecurrencyamount.setValue(BigDecimal.valueOf(AItem.getFbaPrice()));
|
| 517 |
price.setStandardPrice(overridecurrencyamount);
|
517 |
price.setStandardPrice(overridecurrencyamount);
|
| 518 |
Random rand = new Random();
|
518 |
Random rand = new Random();
|
| 519 |
message.setMessageID(BigInteger.valueOf(Math.abs(rand.nextInt())));
|
519 |
message.setMessageID(BigInteger.valueOf(Math.abs(rand.nextInt())));
|
| - |
|
520 |
if ((AItem.getFbaPromoStartDate()<=getTimeInMilliseconds() && AItem.getFbaPromoEndDate()>=getTimeInMilliseconds()) && !AItem.isIsFbaPromotionActive()){
|
| - |
|
521 |
//safety check
|
| - |
|
522 |
continue;
|
| - |
|
523 |
}
|
| 520 |
if (AItem.isIsFbaPromotionActive() && (AItem.getFbaPromoStartDate()<=getTimeInMilliseconds() && AItem.getFbaPromoEndDate()>=getTimeInMilliseconds())){
|
524 |
if (AItem.isIsFbaPromotionActive() && (AItem.getFbaPromoStartDate()<=getTimeInMilliseconds() && AItem.getFbaPromoEndDate()>=getTimeInMilliseconds())){
|
| 521 |
Sale sale = new Sale();
|
525 |
Sale sale = new Sale();
|
| 522 |
OverrideCurrencyAmount overridesaleamount = new OverrideCurrencyAmount();
|
526 |
OverrideCurrencyAmount overridesaleamount = new OverrideCurrencyAmount();
|
| 523 |
overridesaleamount.setCurrency(BaseCurrencyCodeWithDefault.DEFAULT);
|
527 |
overridesaleamount.setCurrency(BaseCurrencyCodeWithDefault.DEFAULT);
|
| 524 |
overridesaleamount.setValue(BigDecimal.valueOf(AItem.getFbaPromoPrice()));
|
528 |
overridesaleamount.setValue(BigDecimal.valueOf(AItem.getFbaPromoPrice()));
|