Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support new Galaxy configuration setting interactivetoolsproxy_map #120

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,9 @@ The following options in the ``gravity`` section of ``galaxy.yml`` can be used t
# Public-facing port of the proxy
# port: 4002

# Routes file to monitor.
# Should be set to the same path as ``interactivetools_map`` in the ``galaxy:`` section. This is ignored if
# ``interactivetools_map is set``.
# Database to monitor.
# Should be set to the same value as ``interactivetools_map`` (or ``interactivetoolsproxy_map``) in the ``galaxy:`` section. This is
# ignored if either ``interactivetools_map`` or ``interactivetoolsproxy_map`` are set.
# sessions: database/interactivetools_map.sqlite

# Include verbose messages in gx-it-proxy
Expand Down
6 changes: 3 additions & 3 deletions gravity/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,9 @@ class GxItProxySettings(BaseModel):
sessions: str = Field(
default="database/interactivetools_map.sqlite",
description="""
Routes file to monitor.
Should be set to the same path as ``interactivetools_map`` in the ``galaxy:`` section. This is ignored if
``interactivetools_map is set``.
Database to monitor.
Should be set to the same value as ``interactivetools_map`` (or ``interactivetoolsproxy_map``) in the ``galaxy:`` section. This is
ignored if either ``interactivetools_map`` or ``interactivetoolsproxy_map`` are set.
""")
verbose: bool = Field(default=True, description="Include verbose messages in gx-it-proxy")
forward_ip: Optional[str] = Field(
Expand Down
5 changes: 4 additions & 1 deletion gravity/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,10 @@ class GalaxyGxItProxyService(Service):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
# override from Galaxy config if set
self.settings["sessions"] = self.config.app_config.get("interactivetools_map", self.settings["sessions"])
self.settings["sessions"] = (
self.config.app_config.get("interactivetoolsproxy_map") or
self.config.app_config.get("interactivetools_map", self.settings["sessions"])
)
# this can only be set in Galaxy config
it_base_path = self.config.app_config.get("interactivetools_base_path", "/")
it_base_path = "/" + f"/{it_base_path.strip('/')}/".lstrip("/")
Expand Down
Loading