Merge "Increase rabbitmq connections attempt"
This commit is contained in:
commit
1190973843
@ -107,6 +107,12 @@ lock_path = $state_path/lock
|
||||
# The name of the queue that will be created for API events.
|
||||
# rabbit_event_queue_name=storyboard_events
|
||||
|
||||
# The number of connection attempts before giving-up
|
||||
# rabbit_connection_attempts = 6
|
||||
|
||||
# The interval between connection attempts (in seconds)
|
||||
# rabbit_retry_delay = 10
|
||||
|
||||
[database]
|
||||
# This line MUST be changed to actually run storyboard
|
||||
# Example:
|
||||
|
@ -40,4 +40,8 @@ NOTIFICATION_OPTS = [
|
||||
cfg.StrOpt("rabbit_virtual_host", default="/",
|
||||
help="The virtual host within which our queues and exchanges "
|
||||
"live."),
|
||||
cfg.IntOpt("rabbit_connection_attempts", default=6,
|
||||
help="The number of connection attempts before giving-up"),
|
||||
cfg.IntOpt("rabbit_retry_delay", default=10,
|
||||
help="The interval between connection attempts (in seconds)")
|
||||
]
|
||||
|
@ -56,7 +56,9 @@ class ConnectionService(object):
|
||||
conf.rabbit_host,
|
||||
conf.rabbit_port,
|
||||
conf.rabbit_virtual_host,
|
||||
self._connection_credentials)
|
||||
self._connection_credentials,
|
||||
connection_attempts=conf.rabbit_connection_attempts,
|
||||
retry_delay=conf.rabbit_retry_delay)
|
||||
|
||||
def _connect(self):
|
||||
"""This method connects to RabbitMQ, establishes a channel, declares
|
||||
|
Loading…
Reference in New Issue
Block a user