Skip to content

Commit

Permalink
refactor: use PLUGINS configuration settings
Browse files Browse the repository at this point in the history
- use PLUGINS configuration settings to identify if discovery is enabled or not
  • Loading branch information
Muhammad Faraz Maqsood committed Aug 13, 2024
1 parent 3b98f3b commit 5853c81
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tutorminio/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
__version__ += "-" + __version_suffix__

HERE = os.path.abspath(os.path.dirname(__file__))
LOADED_PLUGINS = [plugin for plugin in tutor_hooks.Filters.PLUGINS_LOADED.iterate()]

config: dict[str, dict[str, t.Any]] = {
"defaults": {
Expand All @@ -35,7 +34,7 @@
"DOCKER_IMAGE": "docker.io/minio/minio:RELEASE.2022-03-26T06-49-28Z.hotfix.26ec6a857",
"MC_DOCKER_IMAGE": "docker.io/minio/mc:RELEASE.2022-03-31T04-55-30Z",
"GATEWAY": None,
"DISCOVERY_BUCKET_NAME": ("discovery" in LOADED_PLUGINS) and "discoveryuploads",
"DISCOVERY_BUCKET_NAME": "{% if 'discovery' in PLUGINS %}discoveryuploads{% endif %}",
},
"unique": {
"AWS_SECRET_ACCESS_KEY": "{{ 24|random_string }}",
Expand Down

0 comments on commit 5853c81

Please sign in to comment.