Example #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()
Example #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')
Example #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)
Example #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)
Example #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)
Example #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()
    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)
Example #10
0
 def __init__(self, context, shared_client=True):
     BaseStorage.__init__(self, context)
     self.shared_client = shared_client
     self.bucket = self.get_bucket()
Example #11
0
 def __init__(self, context):
     BaseStorage.__init__(self, context)
     self.storage = self.__get_s3_bucket()
Example #12
0
 def __init__(self, context):
     BaseStorage.__init__(self, context)
     AwsStorage.__init__(self, context, 'RESULT_STORAGE')
 def __init__(self, context):
     BaseStorage.__init__(self, context)
Example #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)
Example #15
0
 def __init__(self, context):
     BaseStorage.__init__(self, context)
     logger.debug('Initializing File Result Storage')
Example #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()
Example #18
0
 def __init__(self, context):
     BaseStorage.__init__(self, context)
     self.storage = self.__get_s3_bucket()