Skip to content

Commit

Permalink
chore: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeWithEmad committed Nov 27, 2023
1 parent 51d44f4 commit 1a2ef7b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
1 change: 0 additions & 1 deletion tutorminio/__about__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
__version__ = "16.0.1"

15 changes: 7 additions & 8 deletions tutorminio/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

HERE = os.path.abspath(os.path.dirname(__file__))

config: t.Dict[str, t.Dict[str, t.Any]] = {
config: dict[str, dict[str, t.Any]] = {
"defaults": {
"VERSION": __version__,
"BUCKET_NAME": "openedx",
Expand Down Expand Up @@ -53,17 +53,16 @@
list(config.get("overrides", {}).items())
)


@tutor_hooks.Filters.APP_PUBLIC_HOSTS.add()
def add_minio_hosts(
hosts: list[str], context_name: Literal["local", "dev"]
) -> list[str]:
if context_name == "dev":
hosts.append("{{ MINIO_CONSOLE_HOST }}:9001")
else:
hosts.append("{{ MINIO_CONSOLE_HOST }}")

hosts: list[str], context_name: t.Literal["local", "dev"]
) -> list[str]:
port = ":9001" if context_name == "dev" else ""
hosts.append(f"{{{{MINIO_CONSOLE_HOST}}}}{port}")
return hosts


# Add pre-init script as init task with high priority
with open(
os.path.join(HERE, "templates", "minio", "tasks", "minio", "init.sh"),
Expand Down

0 comments on commit 1a2ef7b

Please sign in to comment.