Skip to content
Snippets Groups Projects
Commit 45176746 authored by Martin Blanchard's avatar Martin Blanchard
Browse files

Introduce an action browser URL config. key

parent 804fcff5
No related branches found
No related tags found
No related merge requests found
......@@ -235,8 +235,8 @@ class Execution(YamlFactory):
yaml_tag = u'!execution'
def __new__(cls, storage, action_cache=None):
return ExecutionController(action_cache, storage)
def __new__(cls, storage, action_cache=None, action_browser_url=None):
return ExecutionController(storage, action_cache, action_browser_url)
class Action(YamlFactory):
......
......@@ -75,7 +75,7 @@ instances:
# Whether or not writing to the cache is allowed.
allow-updates: true
##
# Whether failed actions (non-zero exit code) are stored
# Whether failed actions (non-zero exit code) are stored.
cache-failed-actions: true
- !execution
......@@ -85,6 +85,9 @@ instances:
##
# Alias to an action-cache service.
action-cache: *main-action
##
# Base URL for external build action (web) browser service.
action-browser-url: http://localhost:8080
- !cas
##
......
......@@ -36,7 +36,7 @@ from .operations.instance import OperationsInstance
class ExecutionController:
def __init__(self, action_cache=None, storage=None):
def __init__(self, storage=None, action_cache=None, action_browser_url=None):
self.__logger = logging.getLogger(__name__)
scheduler = Scheduler(action_cache)
......
......@@ -66,10 +66,10 @@ def controller(request):
if request.param == "action-cache":
cache = ActionCache(storage, 50)
yield ExecutionController(cache, storage)
yield ExecutionController(storage=storage, action_cache=cache)
else:
yield ExecutionController(None, storage)
yield ExecutionController(storage=storage)
# Instance to test
......
......@@ -71,7 +71,7 @@ def controller():
write_session.write(action.SerializeToString())
storage.commit_write(action_digest, write_session)
yield ExecutionController(None, storage)
yield ExecutionController(storage=storage)
# Instance to test
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment