def new_file(self, *args, **kwargs): super(CassandraFileUploadHandler, self).new_file(*args, **kwargs) # set chunk size to 256KB. default is 64KB self.chunk_size = 256 * 2 ** 10 # generate a random uuid to use for cassandra row key self.uuid = uuid.uuid4().hex self.chunk_list = [] self._cf = cass.getColumnFamily("TempFiles") try: cass.insertRecord(self._cf, self.uuid, {}) except cass.DatabaseError: raise UploadFileException("Error inserting temporary file record into cassandra")
def __init__(self): self._cf = cass.getColumnFamily("OpenIdAssocs") self._nonce_cf = cass.getColumnFamily("OpenIdNonces")
def __init__(self, session_key=None): self._cf = cass.getColumnFamily("Sessions") super(SessionStore, self).__init__(session_key)