Skip to content

Commit

Permalink
Merge pull request #323 from StackStorm/fix_broken_build
Browse files Browse the repository at this point in the history
Fix: config parsing of live action endpoint
  • Loading branch information
lakshmi-kannan committed Aug 1, 2014
2 parents ad69ae7 + f7040d8 commit a11350e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
LOG = logging.getLogger(__name__)


DEFAULT_LIVEACTIONS_ENDPOINT = cfg.CONF.liveactions.liveactions_base_url
MONITOR_THREAD_EMPTY_Q_SLEEP_TIME = 5
MONITOR_THREAD_NO_WORKERS_SLEEP_TIME = 1

Expand All @@ -40,8 +39,8 @@ class ActionExecutionsController(RestController):
the lifecycle of ActionExecutions in the system.
"""

def __init__(self, live_actions_ep=DEFAULT_LIVEACTIONS_ENDPOINT, live_actions_pool_size=50):
self._live_actions_ep = live_actions_ep
def __init__(self, live_actions_pool_size=50):
self._live_actions_ep = cfg.CONF.liveactions.liveactions_base_url
LOG.info('Live actions ep: %s', self._live_actions_ep)
self.live_actions_pool_size = live_actions_pool_size
self._live_actions_pool = eventlet.GreenPool(self.live_actions_pool_size)
Expand Down
5 changes: 5 additions & 0 deletions st2actioncontroller/tests/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ def __setup_config_opts():
]
__register_opts(pecan_opts, group='action_controller_pecan')

liveactions_opts = [
cfg.StrOpt('liveactions_base_url', default='http://localhost:9501/liveactions',
help='Base URL for live actions.')
]
__register_opts(liveactions_opts, group='liveactions')

def parse_args():
__setup_config_opts()
Expand Down

0 comments on commit a11350e

Please sign in to comment.