commit/galaxy-central: greg: Enhance the hours_between_check config setting to handle float values in addition to int values. This allows for functional tests to test the Galaxy update manager.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/c7bde6953174/ changeset: c7bde6953174 user: greg date: 2013-03-08 15:14:23 summary: Enhance the hours_between_check config setting to handle float values in addition to int values. This allows for functional tests to test the Galaxy update manager. affected #: 2 files diff -r e3ae0bbd800a68532fc51625642e0abc29e1b085 -r c7bde6953174eabe5510c89d023ffd8232592f11 lib/galaxy/config.py --- a/lib/galaxy/config.py +++ b/lib/galaxy/config.py @@ -69,9 +69,14 @@ self.shed_tool_data_table_config = resolve_path( kwargs.get( 'shed_tool_data_table_config', 'shed_tool_data_table_conf.xml' ), self.root ) self.enable_tool_shed_check = string_as_bool( kwargs.get( 'enable_tool_shed_check', False ) ) try: - self.hours_between_check = int( kwargs.get( 'hours_between_check', 12 ) ) - if self.hours_between_check < 1 or self.hours_between_check > 24: - self.hours_between_check = 12 + self.hours_between_check = kwargs.get( 'hours_between_check', 12 ) + if isinstance( hours_between_check, float ): + # Float values are supported for functional tests. + if self.hours_between_check < 0.001 or self.hours_between_check > 24.0: + self.hours_between_check = 12.0 + else: + if self.hours_between_check < 1 or self.hours_between_check > 24: + self.hours_between_check = 12 except: self.hours_between_check = 12 self.update_integrated_tool_panel = kwargs.get( "update_integrated_tool_panel", True ) diff -r e3ae0bbd800a68532fc51625642e0abc29e1b085 -r c7bde6953174eabe5510c89d023ffd8232592f11 lib/tool_shed/galaxy_install/update_manager.py --- a/lib/tool_shed/galaxy_install/update_manager.py +++ b/lib/tool_shed/galaxy_install/update_manager.py @@ -18,7 +18,7 @@ self.sleeper = Sleeper() self.restarter = threading.Thread( target=self.__restarter ) self.restarter.start() - self.seconds_to_sleep = app.config.hours_between_check * 3600 + self.seconds_to_sleep = int( app.config.hours_between_check * 3600 ) def __restarter( self ): log.info( 'Update manager restarter starting up...' ) while self.running: 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