Changeset View
Changeset View
Standalone View
Standalone View
swh/journal/client.py
Show First 20 Lines • Show All 89 Lines • ▼ Show 20 Lines | def __init__( | ||||
logger.debug('Consumer settings: %s', consumer_settings) | logger.debug('Consumer settings: %s', consumer_settings) | ||||
self.consumer = Consumer(consumer_settings, logger=logger) | self.consumer = Consumer(consumer_settings, logger=logger) | ||||
topics = ['%s.%s' % (prefix, object_type) | topics = ['%s.%s' % (prefix, object_type) | ||||
for object_type in object_types] | for object_type in object_types] | ||||
logger.debug('Upstream topics: %s', | logger.debug('Upstream topics: %s', | ||||
self.consumer.list_topics(timeout=1)) | self.consumer.list_topics(timeout=10)) | ||||
logger.debug('Subscribing to: %s', topics) | logger.debug('Subscribing to: %s', topics) | ||||
self.consumer.subscribe(topics=topics) | self.consumer.subscribe(topics=topics) | ||||
self.max_messages = max_messages | self.max_messages = max_messages | ||||
self.process_timeout = process_timeout | self.process_timeout = process_timeout | ||||
self._object_types = object_types | self._object_types = object_types | ||||
▲ Show 20 Lines • Show All 63 Lines • Show Last 20 Lines |