Opened 15 years ago
Last modified 14 years ago
#196 closed enhancement (FIXED)
Change storage configuration in .ini
| Reported by: | Elrond | Owned by: | Elrond |
|---|---|---|---|
| Priority: | minor | Milestone: | 0.0.5 |
| Component: | programming | Keywords: | |
| Cc: | Parent Tickets: |
Description
The current configuration for the storage looks like this:
[mediagoblin] publicstore_class = StorageBackend publicstore_base_dir = %(here)s/user_dev/media/public publicstore_base_url = /mgoblin_media/ publicstore_password = secret
Instead I suggest an alternative configuration scheme:
[storage:publicstore] class = StorageBackend base_dir = %(here)s/user_dev/media/public base_url = /mgoblin_media/ password = secret
I implemented this on my dev/storage_config branch.
There is also an other config option with configobj, sub sub sections:
[storage] [ [ publicstore ] ] base_dir = %(here)s/user_dev/media/public base_url = /mgoblin_media/ [ [ queuestore ] ] base_dir = %(here)s/user_dev/media/queue
I don't know, if this one is "better". I would prefer the first one.
Change History (8)
comment:1 by , 15 years ago
comment:2 by , 15 years ago
| Owner: | changed from to |
|---|
Elrond, is your branch for this mergable in your opinion?
It's looking good to me. I only see a few things that are of issue:
- storage_system_from_config(config) should become storage_system_from_config(config_section) as we aren't now taking the whole config
- Arguments: in storage_system_from_config docstring should be updated to match reality.
I'm assigning this to Elrond because I don't understand why it was assigned to Joar. ;) If there's a good reason, assign it back.
comment:3 by , 15 years ago
| Owner: | changed from to |
|---|---|
| Status: | New → Feedback |
I assigned this to joar for testing. Because he has a setup which actually uses the storage config, so he could test these changes in the "real world".
Pushed a new commit on my branch to address documentation issues.
comment:4 by , 15 years ago
joar, if you have some time, could you test this config scheme change with your CloudFiles? Just to see, if it makes sense to you?
comment:5 by , 15 years ago
Hi Elrond, I agree with Christopher.
The first alternative seems easier on the eyes than the second alternative, and to ease the burden on site administrators, I think we should go with it.
Setting the CloudFiles settings in that way should not be a problem, but I guess that there need to be some changes in any code that utilizes the app_config?
These are the current options for CloudFiles: http://wiki.mediagoblin.org/Configure_MediaGoblin#Setting_up_Cloud_Files_public_storage
comment:6 by , 15 years ago
| Milestone: | → 0.0.5 |
|---|---|
| Owner: | changed from to |
| Status: | Feedback → Closed |
Merged! I also fixed the tests appropriately also.
comment:8 by , 14 years ago
| Type: | defect → enhancement |
|---|

The first almost certainly seems better to me.