Subversion Repositories SmartDukaan

Rev

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

Rev 3896 Rev 3910
Line 5... Line 5...
5
'''
5
'''
6
import logging
6
import logging
7
import subprocess
7
import subprocess
8
 
8
 
9
from shop2020.config.client.ConfigClient import ConfigClient
9
from shop2020.config.client.ConfigClient import ConfigClient
-
 
10
from shop2020.thriftpy.content.ttypes import ContentServiceException
10
logging.basicConfig(level=logging.DEBUG)
11
logging.basicConfig(level=logging.DEBUG)
11
 
12
 
12
class ContentHandler:
13
class ContentHandler:
13
    '''
14
    '''
14
    classdocs
15
    classdocs
Line 26... Line 27...
26
        """
27
        """
27
        Push the content of one entity to production
28
        Push the content of one entity to production
28
        Parameters:
29
        Parameters:
29
         - entityId
30
         - entityId
30
        """
31
        """
31
        retval = subprocess.call([self.scriptPath, entityId])
32
        retval = subprocess.call([self.scriptPath, str(entityId)])
32
        if retval:
33
        if retval:
33
            raise Exception("Pushing content to production failed")
34
            raise ContentServiceException(id=1, message="Pushing content to production failed")
34
        return True
35
        return True
35
    
36
    
36
    def close_session(self):
37
    def close_session(self):
37
        pass
38
        pass
38
    
39