Subversion Repositories SmartDukaan

Rev

Rev 2372 | Rev 2427 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2372 Rev 2378
Line 3... Line 3...
3
import in.shop2020.catalog.dashboard.client.CatalogService;
3
import in.shop2020.catalog.dashboard.client.CatalogService;
4
import in.shop2020.catalog.dashboard.shared.Item;
4
import in.shop2020.catalog.dashboard.shared.Item;
5
import in.shop2020.catalog.dashboard.shared.ItemsComparator;
5
import in.shop2020.catalog.dashboard.shared.ItemsComparator;
6
import in.shop2020.catalog.dashboard.shared.VendorItemMapping;
6
import in.shop2020.catalog.dashboard.shared.VendorItemMapping;
7
import in.shop2020.catalog.dashboard.shared.VendorPricings;
7
import in.shop2020.catalog.dashboard.shared.VendorPricings;
-
 
8
import in.shop2020.config.ConfigException;
8
import in.shop2020.model.v1.catalog.InventoryService;
9
import in.shop2020.model.v1.catalog.InventoryService;
9
import in.shop2020.model.v1.catalog.status;
10
import in.shop2020.model.v1.catalog.status;
10
import in.shop2020.thrift.clients.CatalogServiceClient;
11
import in.shop2020.thrift.clients.CatalogServiceClient;
-
 
12
import in.shop2020.thrift.clients.config.ConfigClient;
11
import in.shop2020.utils.CategoryManager;
13
import in.shop2020.utils.CategoryManager;
12
import in.shop2020.utils.ConfigClientKeys;
14
import in.shop2020.utils.ConfigClientKeys;
13
 
15
 
14
import java.io.ByteArrayOutputStream;
16
import java.io.ByteArrayOutputStream;
15
import java.io.IOException;
17
import java.io.IOException;
Line 658... Line 660...
658
        }
660
        }
659
        
661
        
660
        // Push the content of one item to production 
662
        // Push the content of one item to production 
661
        Process p;
663
        Process p;
662
		try {
664
		try {
-
 
665
		    String scriptPath = ConfigClient.getClient().get(ConfigClientKeys.PUSH_PRICES_TO_PROD_SCRIPT_PATH.toString());
663
			p = Runtime.getRuntime().exec( "/root/code/trunk/runutils/push-content-to-production.sh " + item.getCatalogItemId());
666
			p = Runtime.getRuntime().exec(scriptPath + " " + item.getCatalogItemId());
664
			p.waitFor();
667
			p.waitFor();
665
		} catch (IOException e) {
668
		} catch (IOException e) {
666
			GWT.log("Not able to update content on production");
669
			GWT.log("Not able to update content on production");
667
			e.printStackTrace();
670
			e.printStackTrace();
668
			return false;
671
			return false;
669
		} catch (InterruptedException e) {
672
		} catch (InterruptedException e) {
670
			GWT.log("Not able to update content on production");
673
			GWT.log("Not able to update content on production");
671
			e.printStackTrace();
674
			e.printStackTrace();
672
			return false;
675
			return false;
-
 
676
		} catch (ConfigException e) {
-
 
677
            // TODO Auto-generated catch block
-
 
678
            e.printStackTrace();
-
 
679
            return false;
673
		} 
680
        } 
674
        
681
        
675
        return true;
682
        return true;
676
    }
683
    }
677
}
684
}
678
 
685