[Tilesathome] [PATCH] Don't rename uploaded files to ${file}_uploaded if using a common upload directory
Ævar Arnfjörð Bjarmason
avarab at gmail.com
Mon Oct 27 16:54:50 GMT 2008
I run a t at h setup with multiple clients generating tilesets and a
single uploader, the typical client configuration is:
WorkingDirectory = /home/avar/src/tah/work/tah-3
UploadToDirectory = 1
UploadTargetDirectory = /home/avar/src/tah/uploadable
DeleteZipFilesAfterUpload=0
And the upload client is:
WorkingDirectory = /home/avar/src/tah/work/tah-upload
UploadToDirectory = 0
ForkForUpload = 0
DeleteZipFilesAfterUpload=0
The uploadable directory in each client's working directory is then
symlinked to a central uploadable directory everyone uses:
$ file work/tah-{3,upload}/uploadable
work/tah-3/uploadable: symbolic link to `/home/avar/src/tah/uploadable'
work/tah-upload/uploadable: symbolic link to `/home/avar/src/tah/uploadable'
Recently this setup broke due to changes in SVN (I don't know what
change specifically) and all the non-uploading clients started
dropping zip files with the _uploaded suffix in their upload directory
even though they weren't uploading them. To get them uploaded I needed
to run:
$ rename 's/_uploaded$//g' *
And then run the upload client.
This patch to Upload.pm I'm submitting causes Upload::upload() not to
unlink or rename zip files in the uploadable working directory if the
UploadToDirectory variable is set in the config. It works for me but
there may be some side effects of this I haven't considered.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Upload.pm.patch
Type: text/x-diff
Size: 473 bytes
Desc: not available
URL: <http://lists.openstreetmap.org/pipermail/tilesathome/attachments/20081027/eb7fa7ba/attachment.patch>
More information about the Tilesathome
mailing list