Skip to content

Commit

Permalink
Merge pull request #120 from kysrpex/interactivetoolssqlalchemy
Browse files Browse the repository at this point in the history
Support new Galaxy configuration setting `interactivetoolsproxy_map`
  • Loading branch information
natefoo authored Jan 2, 2025
2 parents 51735b2 + 343223a commit 1d07f0c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
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 @@ -250,9 +250,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 @@ -397,7 +397,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

0 comments on commit 1d07f0c

Please sign in to comment.