Skip to content

Commit

Permalink
Merge branch 'master' into add-msteams
Browse files Browse the repository at this point in the history
  • Loading branch information
blag authored Mar 26, 2019
2 parents 2be8bc7 + c592795 commit 1fb0f87
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions conf/st2.conf.sample
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ packs_base_paths = None
[coordination]
# Endpoint for the coordination server.
url = None
# True to register StackStorm services in a service registry.
service_registry = False
# TTL for the lock if backend suports it.
lock_timeout = 60

Expand Down
5 changes: 4 additions & 1 deletion st2common/st2common/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,10 @@ def register_opts(ignore_errors=False):
help='Endpoint for the coordination server.'),
cfg.IntOpt(
'lock_timeout', default=60,
help='TTL for the lock if backend suports it.')
help='TTL for the lock if backend suports it.'),
cfg.BoolOpt(
'service_registry', default=False,
help='True to register StackStorm services in a service registry.'),
]

do_register_opts(coord_opts, 'coordination', ignore_errors)
Expand Down
2 changes: 1 addition & 1 deletion st2common/st2common/service_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def setup(service, config, setup_db=True, register_mq_exchanges=True,
metrics_initialize()

# Register service in the service registry
if service_registry:
if cfg.CONF.coordination.service_registry and service_registry:
# NOTE: It's important that we pass start_heart=True to start the hearbeat process
register_service_in_service_registry(service=service, capabilities=capabilities,
start_heart=True)
Expand Down

0 comments on commit 1fb0f87

Please sign in to comment.