Subversion Repositories SmartDukaan

Rev

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

Rev 3355 Rev 3376
Line 6... Line 6...
6
from shop2020.thriftpy.logistics.ttypes import LogisticsInfo,\
6
from shop2020.thriftpy.logistics.ttypes import LogisticsInfo,\
7
    LogisticsServiceException, DeliveryType
7
    LogisticsServiceException, DeliveryType
8
from shop2020.logistics.service.impl.DataAccessor import get_empty_AWB,\
8
from shop2020.logistics.service.impl.DataAccessor import get_empty_AWB,\
9
    get_shipment_info, initialize, get_logistics_estimation, get_provider,\
9
    get_shipment_info, initialize, get_logistics_estimation, get_provider,\
10
    get_providers, close_session, get_free_awb_count, get_holidays,\
10
    get_providers, close_session, get_free_awb_count, get_holidays,\
11
    is_cod_allowed
11
    is_cod_allowed, is_alive
12
from shop2020.logistics.service.impl.Converters import to_t_awbupdate,\
12
from shop2020.logistics.service.impl.Converters import to_t_awbupdate,\
13
    to_t_provider
13
    to_t_provider
14
from shop2020.clients.CatalogClient import CatalogClient
14
from shop2020.clients.CatalogClient import CatalogClient
15
from shop2020.config.client.ConfigClient import ConfigClient
15
from shop2020.config.client.ConfigClient import ConfigClient
16
import datetime
16
import datetime
Line 243... Line 243...
243
        finally:
243
        finally:
244
            close_session()
244
            close_session()
245
        
245
        
246
    def closeSession(self, ):
246
    def closeSession(self, ):
247
        close_session()
247
        close_session()
-
 
248
 
-
 
249
    def isAlive(self, ):
-
 
250
        """
-
 
251
        For checking weather service is active alive or not. It also checks connectivity with database
-
 
252
        """
-
 
253
        try:
-
 
254
            return is_alive()
-
 
255
        finally:
-
 
256
            close_session()