def process_cdxj_key(self, cdxj_key): _, rec, _2 = cdxj_key.split(':', 2) recording = Recording(my_id=rec, redis=self.redis, access=BaseAccess()) if not recording.is_open(extend=False): recording.commit_to_storage()
def create_recording(self, **kwargs): self.access.assert_can_admin_coll(self) recording = Recording(redis=self.redis, access=self.access) rec = recording.init_new(**kwargs) self.recs.add_object(recording, owner=True) return recording
def get_recording(self, rec): if not self.recs.contains_id(rec): return None recording = Recording(my_id=rec, name=rec, redis=self.redis, access=self.access) recording.owner = self return recording
def create_recording(self, **kwargs): """Create recording. :returns: recording :rtype: Recording """ self.access.assert_can_admin_coll(self) recording = Recording(redis=self.redis, access=self.access) rec = recording.init_new(**kwargs) self.recs.add_object(recording, owner=True) return recording
def get_recording(self, rec): """Return recording. :param str rec: recording ID :returns: recording :rtype: Recording or None """ if not self.recs.contains_id(rec): return None recording = Recording(my_id=rec, name=rec, redis=self.redis, access=self.access) recording.owner = self return recording
def get_recording(self, rec): """Return recording. :param str rec: recording ID :returns: recording :rtype: Recording or None """ if not self.recs.contains_id(rec): return None recording = Recording(my_id=rec, name=rec, redis=self.redis, access=self.access) recording.owner = self return recording
def process_cdxj_key(self, cdxj_key): _, rec, _2 = cdxj_key.split(':', 2) recording = Recording(my_id=rec, redis=self.redis, access=BaseAccess()) if not recording.get_owner(): logger.debug('Deleting Invalid Rec: ' + recording.my_id) recording.delete_object() return if not recording.is_open(extend=False): recording.commit_to_storage()
def process_cdxj_key(self, cdxj_key): _, rec, _2 = cdxj_key.split(':', 2) recording = Recording(my_id=rec, redis=self.redis, access=BaseAccess()) collection = recording.get_owner() if not collection: logger.debug('Deleting Invalid Rec: ' + recording.my_id) recording.delete_object() return if collection.is_external(): logger.debug('Skipping recording commit for external collection: ' + collection.my_id) return if not recording.is_open(extend=False): recording.commit_to_storage()