def get_new_input_collections(self): """ Get new input collections """ coll_status = [CollectionStatus.Open] colls_open = core_catalog.get_collections_by_status( status=coll_status, relation_type=CollectionRelationType.Input, time_period=self.poll_time_period, locking=True, bulk_size=self.retrieve_bulk_size) self.logger.info( "Main thread get %s [open] input collections to process" % len(colls_open)) coll_status = [CollectionStatus.New] colls_new = core_catalog.get_collections_by_status( status=coll_status, relation_type=CollectionRelationType.Input, locking=True, bulk_size=self.retrieve_bulk_size) self.logger.info( "Main thread get %s [new] input collections to process" % len(colls_new)) colls = colls_open + colls_new self.logger.info( "Main thread get totally %s [open + new] collections to process" % len(colls)) return colls
def get_new_output_collections(self): """ Get new output collections """ coll_status = [CollectionStatus.Updated, CollectionStatus.Processing] colls = core_catalog.get_collections_by_status( status=coll_status, relation_type=CollectionRelationType.Output, time_period=self.poll_time_period, locking=True, bulk_size=self.retrieve_bulk_size) self.logger.info( "Main thread get %s [Updated + Processing] output collections to process" % len(colls)) return colls