ckan / ckanext-archiver

Archive CKAN resources
MIT License
21 stars 46 forks source link

settings from global CKAN configuration files not taken into account #20

Closed dlax closed 8 years ago

dlax commented 8 years ago

I noticed that settings from the main CKAN configuration file (eg. development.ini file passed with -c to paster commands) are not taken into account. Not sure this is true for all options, but at least for ckanext-archiver.archive_dir. This seems to be due to the fact that these options' values are read from default_setttings.py file which, if imported before pylons.config gets initialized, would not get any values from the CKAN configuration file. For instance, module task.py import this default_settings module and the configuration is empty there, whereas it is not after load_config function is called, but this is too late since the latter function is called after the default_settings got imported.

davidread commented 8 years ago

Thanks for spotting this @dlax. Should be ok now, with the PR I just merged.

dlax commented 8 years ago

David Read wrote:

Thanks for spotting this @dlax https://github.com/dlax. Should be ok now, with the PR I just merged.

Yes, it is. Thanks for the quick fix.