Opened 13 years ago

Last modified 12 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:


The current configuration for the storage looks like this:


    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:


    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


      [ [ 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

Change History (8)

comment:1 by Christopher Allan Webber, 13 years ago

The first almost certainly seems better to me.

comment:2 by Christopher Allan Webber, 13 years ago

Owner: changed from Joar Wandborg to Elvenlord Elrond
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

-  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 Elrond, 13 years ago

Owner: changed from Elvenlord Elrond to Christopher Webber
Status: NewFeedback
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 Elrond, 13 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

comment:5 by joar, 13 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:
`\_MediaGoblin#Setting\_up\_Cloud\_Files\_public\_storage <>`_

comment:6 by Christopher Allan Webber, 13 years ago

Milestone: 0.0.5
Owner: changed from Christopher Webber to Elvenlord Elrond
Status: FeedbackClosed
Merged! I also fixed the tests appropriately also.

comment:7 by Will Kahn-Greene, 12 years ago

The original url for this bug was .

comment:8 by Elrond, 12 years ago

Type: defectenhancement
Note: See TracTickets for help on using tickets.