コード例 #1
0
ファイル: s3_storage.py プロジェクト: sayeghr/aws
 def __init__(self, context):
     """
     Constructor
     :param Context context: Thumbor's context
     """
     BaseStorage.__init__(self, context)
     AwsStorage.__init__(self, context, 'TC_AWS_RESULT_STORAGE')
コード例 #2
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)
コード例 #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')
     self.storage_expiration_seconds = context.config.get(
         'RESULT_STORAGE_EXPIRATION_SECONDS', 3600)
コード例 #4
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()
コード例 #5
0
 def __init__(self, context):
     BaseStorage.__init__(self, context)
コード例 #6
0
 def __init__(self, context, shared_client=True):
     BaseStorage.__init__(self, context)
     self.shared_client = shared_client
     self.bucket = self.get_bucket()
コード例 #7
0
ファイル: s3_storage.py プロジェクト: gitter-badger/aws-1
 def __init__(self, context):
     BaseStorage.__init__(self, context)
     AwsStorage.__init__(self, context, 'RESULT_STORAGE')
コード例 #8
0
 def __init__(self, context):
     BaseStorage.__init__(self, context)
     self.storage = self.__get_s3_bucket()