commit/galaxy-central: jmchilton: Optimization of API polling during tool testing.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/c465fdbdbdb2/ Changeset: c465fdbdbdb2 User: jmchilton Date: 2014-10-14 16:56:50+00:00 Summary: Optimization of API polling during tool testing. Not the kind of optimization where you take something reasonable and brilliantly streamline it - but the kind of optimization where you take something ridiculus and make it less so. Oh past @jmchilton there is just no hope for you... Affected #: 1 file diff -r dbee027f74101741533851ce2634b60adca4c454 -r c465fdbdbdb2db64e08c31e8eb0084c20e9e50ff test/base/twilltestcase.py --- a/test/base/twilltestcase.py +++ b/test/base/twilltestcase.py @@ -1294,14 +1294,9 @@ def get_running_datasets( self ): self.visit_url( '/api/histories' ) history_id = loads( self.last_page() )[0][ 'id' ] - self.visit_url( '/api/histories/%s/contents' % history_id ) + self.visit_url( '/api/histories/%s' % history_id ) jsondata = loads( self.last_page() ) - for history_item in jsondata: - self.visit_url( history_item[ 'url' ] ) - item_json = loads( self.last_page() ) - if item_json[ 'state' ] in [ 'queued', 'running', 'paused' ]: - return True - return False + return jsondata[ 'state' ] in [ 'new', 'queued', 'running' ] def get_tags( self, item_id, item_class ): self.visit_url( "%s/tag/get_tagging_elt_async?item_id=%s&item_class=%s" % \ 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)
-
commits-noreply@bitbucket.org