Ejemplo n.º 1
0
 def __init__(self, context):
     """
     Constructor
     :param Context context: Thumbor's context
     """
     BaseStorage.__init__(self, context)
     AwsStorage.__init__(self, context, 'TC_AWS_RESULT_STORAGE')
    def __init__(self, context):
        '''Initialize the RedisStorage

        :param thumbor.context.Context shared_client: Current context
        :param boolean shared_client: When set to True a singleton client will
                                      be used.
        '''

        BaseStorage.__init__(self, context)

        if not Storage.pool:
            Storage.pool = tornadis.ClientPool(
                max_size=self.context.config.get(
                    'REDIS_TORNADO_RESULT_STORAGE_POOL_MAX_SIZE',
                    -1
                ),
                client_timeout=self.context.config.get(
                    'REDIS_TORNADO_RESULT_STORAGE_CLIENT_TIMEOUT',
                    -1
                ),
                port=self.context.config.REDIS_RESULT_STORAGE_SERVER_PORT,
                host=self.context.config.REDIS_RESULT_STORAGE_SERVER_HOST,
                # db=self.context.config.REDIS_RESULT_STORAGE_SERVER_DB,
                password=self.context.config.REDIS_RESULT_STORAGE_SERVER_PASSWORD
            )

        if not Storage.start_time:
            Storage.start_time = time.time()
Ejemplo n.º 3
0
 def __init__(self, context):
     """
     Constructor
     :param Context context: Thumbor's context
     """
     BaseStorage.__init__(self, context)
     AwsStorage.__init__(self, context, 'TC_AWS_RESULT_STORAGE')
Ejemplo n.º 4
0
    def __init__(self, context):
        BaseStorage.__init__(self, context)
        self.database, self.storage = self.__conn__()

        if not Storage.start_time:
            Storage.start_time = time.time()
        super(Storage, self).__init__(context)
Ejemplo n.º 5
0
 def __init__(self, context):
     """
     Constructor
     :param Context context: Thumbor's context
     """
     BaseStorage.__init__(self, context)
     AwsStorage.__init__(self, context, 'TC_AWS_RESULT_STORAGE')
     self.storage_expiration_seconds = context.config.get('RESULT_STORAGE_EXPIRATION_SECONDS', 3600)
Ejemplo n.º 6
0
 def __init__(self, context):
     """
     Constructor
     :param Context context: Thumbor's context
     """
     BaseStorage.__init__(self, context)
     AwsStorage.__init__(self, context, 'TC_AWS_RESULT_STORAGE')
     self.storage_expiration_seconds = context.config.get(
         'RESULT_STORAGE_EXPIRATION_SECONDS', 3600)
Ejemplo n.º 7
0
    def __init__(self, context, shared_client=True):
        '''Initialize the RedisStorage
        :param thumbor.context.Context shared_client: Current context
        :param boolean shared_client: When set to True a singleton client will
                                      be used.
        '''

        BaseStorage.__init__(self, context)
        self.shared_client = shared_client
        self.storage = self.reconnect_redis()

        if not Storage.start_time:
            Storage.start_time = time.time()
Ejemplo n.º 8
0
    def __init__(self, context, shared_client=True):
        '''Initialize the RedisStorage

        :param thumbor.context.Context shared_client: Current context
        :param boolean shared_client: When set to True a singleton client will
                                      be used.
        '''

        BaseStorage.__init__(self, context)
        self.shared_client = shared_client
        self.storage = self.reconnect_redis()

        if not Storage.start_time:
            Storage.start_time = time.time()
 def __init__(self, context):
     BaseStorage.__init__(self, context)
Ejemplo n.º 10
0
 def __init__(self, context, shared_client=True):
     BaseStorage.__init__(self, context)
     self.shared_client = shared_client
     self.bucket = self.get_bucket()
Ejemplo n.º 11
0
 def __init__(self, context):
     BaseStorage.__init__(self, context)
     self.storage = self.__get_s3_bucket()
Ejemplo n.º 12
0
 def __init__(self, context):
     BaseStorage.__init__(self, context)
     AwsStorage.__init__(self, context, 'RESULT_STORAGE')
 def __init__(self, context):
     BaseStorage.__init__(self, context)
Ejemplo n.º 14
0
 def __init__(self,context):
   BaseStorage.__init__(self, context)
   if not self.context.config.CEPH_RESULT_STORAGE_POOL:
     raise RuntimeError("CEPH_RESULT_STORAGE_POOL undefined")
   self.storage = self.cluster.open_ioctx(self.context.config.CEPH_RESULT_STORAGE_POOL)
Ejemplo n.º 15
0
 def __init__(self, context):
     BaseStorage.__init__(self, context)
     logger.debug('Initializing File Result Storage')
Ejemplo n.º 16
0
 def __init__(self, context):
     BaseStorage.__init__(self, context)
     AwsStorage.__init__(self, context, 'RESULT_STORAGE')
 def __init__(self, context, shared_client=True):
     BaseStorage.__init__(self, context)
     self.shared_client = shared_client
     self.bucket = self.get_bucket()
Ejemplo n.º 18
0
 def __init__(self, context):
     BaseStorage.__init__(self, context)
     self.storage = self.__get_s3_bucket()