chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] Re: uploading eggs


From: Kon Lovett
Subject: [Chicken-users] Re: uploading eggs
Date: Fri, 5 May 2006 11:06:47 -0700

On May 5, 2006, at 10:07 AM, Thomas Chust wrote:
<snip>

this looks like a practical tool, but I think the script should do some kind of locking on the FTP server to prevent concurrent uploads of the index that overwrite each other, just to be safe. For example one could create a file ".ready" on the server and modify the script somewhat like this (untested):

[...]
(define (upload . files)
(let ([ftp (ftp:connect "www.call-with-current-continuation.org" username password)])
     (let retry ((count 3))
       (condition-case (ftp:rename-file ".ready" ".busy")
         ((exn i/o net ftp)
           (if (fx> count 0)
             (begin
(print "Other upload in progress, waiting a little ...")
               (sleep 20)
               (retry (-- count)))
             (error "Other upload still in progress, giving up")))))
     [...]
     (for-each out files)
     (ftp:rename-file ".busy" ".ready")
     (ftp:disconnect ftp) ) )
[...]

Yeah, I wondered about a race-condition but figured traffic is low. Now that it will increase your suggestion becomes imperative.


Apart from that I personally prefer not to have the complete eggs repository checked out on my harddisk but only projects I work on. This is no longer possible, though, if I want to keep this new tool up-to-date automatically, which is important, as the source for the egg index page is hardcoded into it.


Yes, 70Mb & counting is too much to expect everyone to sacrifice. (and keep in synch.)

Maybe the script could be moved to a subdirectory in the repository, if I'm not the only person finding that more convenient?


In the short-term I have the time to perform uploads for anyone who doesn't want to spend the disk space for the full eggs repository. Just mail me after the egg svn is updated.

Best Wishes,
Kon

<snip>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]