commit/galaxy-central: natefoo: Don't include purged histories in usage calculation.
1 new changeset in galaxy-central: http://bitbucket.org/galaxy/galaxy-central/changeset/338ead4737ba/ changeset: 338ead4737ba user: natefoo date: 2011-09-29 22:45:19 summary: Don't include purged histories in usage calculation. affected #: 1 file (-1 bytes) --- a/lib/galaxy/model/__init__.py Wed Sep 28 15:41:21 2011 -0400 +++ b/lib/galaxy/model/__init__.py Thu Sep 29 16:45:19 2011 -0400 @@ -90,7 +90,7 @@ total = 0 # this can be a huge number and can run out of memory, so we avoid the mappers db_session = object_session( self ) - for history in db_session.query( History ).enable_eagerloads( False ).filter_by( user_id=self.id ).yield_per( 1000 ): + for history in db_session.query( History ).enable_eagerloads( False ).filter_by( user_id=self.id, purged=False ).yield_per( 1000 ): for hda in db_session.query( HistoryDatasetAssociation ).enable_eagerloads( False ).filter_by( history_id=history.id, purged=False ).yield_per( 1000 ): if not hda.dataset.id in dataset_ids and not hda.dataset.purged and not hda.dataset.library_associations: dataset_ids.append( hda.dataset.id ) Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
Bitbucket