wimleers / fileconveyor

File Conveyor is a daemon written in Python to detect, process and sync files. In particular, it's designed to sync files to CDNs. Amazon S3 and Rackspace Cloud Files, as well as any Origin Pull or (S)FTP Push CDN, are supported. Originally written for my bachelor thesis at Hasselt University in Belgium.
https://wimleers.com/fileconveyor
The Unlicense
341 stars 95 forks source link

More configuration options #150

Open AndreasRydberg opened 10 years ago

AndreasRydberg commented 10 years ago

Hi!

  1. Is there a way to disable the delete events? I use S3 both as a fileserver for CloudFront and as a file backup. If a file or directory was deleted by mistake or by error on the origin server, I don't want the files to be deleted on S3 as well.
  2. Is there a way to set configuration options in config.xml? For example: the setting in arbitrator.py there is these lines:
if not 'DJANGO_SETTINGS_MODULE' in os.environ:
    os.environ['DJANGO_SETTINGS_MODULE'] = 'fileconveyor.django_settings'

I would like configuration options like this to be in config.xml instead of using the shell like: export DJANGO_SETTINGS_MODULE=django_settings.

Regards, Andreas

wimleers commented 10 years ago
  1. That is not currently supported. #100 is related — it's the inverse :)
  2. Hrm, why would you want that?
AndreasRydberg commented 10 years ago
  1. I know that fileconveyor can delete synced files from origin server. Not what I was looking for though.
  2. Currently I have to set DJANGO_SETTINGS_MODULE from shell. I solved it by always setting it in the script file I use to start fileconveyor. But it would be nice to have all (alse general/global) settings, if there are more settings, in one place instead of spreading them out. But if it was set in the config.xml it could be something like:
<settings>
  <param name="DJANGO_SETTINGS_MODULE" value="django_settings" />
  <param name="another_setting" value="another_value" />
</settings>

(I have no experience with python, so please excuse any mix-up with python and django.)

wimleers commented 10 years ago
  1. I understand. The answer is: no, it's not yet supported. You can create a pull request to add support for this. Alternatively, you can just hack the code by commenting the code that listens for delete events. That's of course not sustainable in the long term (upgrading will be hard), but it might be a good way to see if File Conveyor can fulfill your needs.
  2. You shouldn't have to set DJANGO_SETTINGS_MODULE at all. Why do you need to set it?