Merge "Continue logging deprecation warnings for run_pause"
This commit is contained in:
		| @@ -198,12 +198,20 @@ class Replicator(Daemon): | ||||
|         self.max_diffs = int(conf.get('max_diffs') or 100) | ||||
|         self.interval = int(conf.get('interval') or | ||||
|                             conf.get('run_pause') or 30) | ||||
|         if 'run_pause' in conf and 'interval' not in conf: | ||||
|             self.logger.warning('Option %(type)s-replicator/run_pause ' | ||||
|                                 'is deprecated and will be removed in a ' | ||||
|                                 'future version. Update your configuration' | ||||
|                                 ' to use option %(type)s-replicator/' | ||||
|                                 'interval.' | ||||
|         if 'run_pause' in conf: | ||||
|             if 'interval' in conf: | ||||
|                 self.logger.warning( | ||||
|                     'Option %(type)s-replicator/run_pause is deprecated ' | ||||
|                     'and %(type)s-replicator/interval is already configured. ' | ||||
|                     'You can safely remove run_pause; it is now ignored and ' | ||||
|                     'will be removed in a future version.' | ||||
|                     % {'type': self.server_type}) | ||||
|             else: | ||||
|                 self.logger.warning( | ||||
|                     'Option %(type)s-replicator/run_pause is deprecated ' | ||||
|                     'and will be removed in a future version. ' | ||||
|                     'Update your configuration to use option ' | ||||
|                     '%(type)s-replicator/interval.' | ||||
|                     % {'type': self.server_type}) | ||||
|         self.databases_per_second = float( | ||||
|             conf.get('databases_per_second', 50)) | ||||
|   | ||||
| @@ -168,12 +168,19 @@ class ObjectReconstructor(Daemon): | ||||
|         self.partition_times = [] | ||||
|         self.interval = int(conf.get('interval') or | ||||
|                             conf.get('run_pause') or 30) | ||||
|         if 'run_pause' in conf and 'interval' not in conf: | ||||
|             self.logger.warning('Option object-reconstructor/run_pause ' | ||||
|                                 'is deprecated and will be removed in a ' | ||||
|                                 'future version. Update your configuration' | ||||
|                                 ' to use option object-reconstructor/' | ||||
|                                 'interval.') | ||||
|         if 'run_pause' in conf: | ||||
|             if 'interval' in conf: | ||||
|                 self.logger.warning( | ||||
|                     'Option object-reconstructor/run_pause is deprecated and ' | ||||
|                     'object-reconstructor/interval is already configured. ' | ||||
|                     'You can safely remove run_pause; it is now ignored and ' | ||||
|                     'will be removed in a future version.') | ||||
|             else: | ||||
|                 self.logger.warning( | ||||
|                     'Option object-reconstructor/run_pause is deprecated ' | ||||
|                     'and will be removed in a future version. ' | ||||
|                     'Update your configuration to use option ' | ||||
|                     'object-reconstructor/interval.') | ||||
|         self.http_timeout = int(conf.get('http_timeout', 60)) | ||||
|         self.lockup_timeout = int(conf.get('lockup_timeout', 1800)) | ||||
|         self.recon_cache_path = conf.get('recon_cache_path', | ||||
|   | ||||
| @@ -148,12 +148,18 @@ class ObjectReplicator(Daemon): | ||||
|         self.partition_times = [] | ||||
|         self.interval = int(conf.get('interval') or | ||||
|                             conf.get('run_pause') or 30) | ||||
|         if 'run_pause' in conf and 'interval' not in conf: | ||||
|             self.logger.warning('Option object-replicator/run_pause ' | ||||
|                                 'is deprecated and will be removed in a ' | ||||
|                                 'future version. Update your configuration' | ||||
|                                 ' to use option object-replicator/' | ||||
|                                 'interval.') | ||||
|         if 'run_pause' in conf: | ||||
|             if 'interval' in conf: | ||||
|                 self.logger.warning( | ||||
|                     'Option object-replicator/run_pause is deprecated and ' | ||||
|                     'object-replicator/interval is already configured. You ' | ||||
|                     'can safely remove run_pause; it is now ignored and will ' | ||||
|                     'be removed in a future version.') | ||||
|             else: | ||||
|                 self.logger.warning( | ||||
|                     'Option object-replicator/run_pause is deprecated and ' | ||||
|                     'will be removed in a future version. Update your ' | ||||
|                     'configuration to use option object-replicator/interval.') | ||||
|         self.rsync_timeout = int(conf.get('rsync_timeout', | ||||
|                                           DEFAULT_RSYNC_TIMEOUT)) | ||||
|         self.rsync_io_timeout = conf.get('rsync_io_timeout', '30') | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Zuul
					Zuul