I want to sync data(JPG-files and JSON) between a local and a remote
Pyramid-app. Is there any built-in capability for that in Pyramid?
Otherwise i'd use the python-requests HTTP library. All comments are
appreciated!
Best regards,
Christian
--
Central Asia by bike, starting May 2013 - http://poab.org
wrote:
> what about using `rsync` on the command line ?
> -- > You received this message because you are subscribed to the Google Groups "pylons-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscribe@googlegroups.com.
> To post to this group, send email to pylons-discuss@googlegroups.com.
> Visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
On 21 March 2013 22:41, Jonathan Vanasco <jonat...@findmeon.com> wrote:
> what about using `rsync` on the command line ?
I'm considering it, probably a mix of binary via rsync and json via
POST. I need to parse that data on the remote end, so some kind of
feedback/callback if everything went fine would be nice. But that's
only really necessary for the json-part, not for the binaries.
Looks like i'll stick with python-requests then. The WebOb-docs are
down unfortunately...
On Mar 21, 7:15 pm, Christian Benke <benkoka...@gmail.com> wrote:
> Hu? What's your idea about?
> The sync will be started by user-input. It's a local webinterface used
> for publishing to a public website - when a internet connection is
> available...
It's a lifesaver for building maintenance scripts -- you have full
access to your pyramid environment, or can just write whatever you
need in some customized script-only logic.
you could easily use a commandline script to wrap all the rsync stuff
(via popen or whatever), then do all the post-processing ( you'd have
access to your helpers and models ). if you're doing periodic syncs,
run it through a crontab. if you're doing a web based trigger... you
could have it trigger a new subprocess ( though i'd probably `touch`
and `rm` a file to use as a semaphore to know if the process is
already running )
> you could easily use a commandline script to wrap all the rsync stuff
> (via popen or whatever), then do all the post-processing ( you'd have
> access to your helpers and models ). if you're doing periodic syncs,
> run it through a crontab. if you're doing a web based trigger... you
> could have it trigger a new subprocess ( though i'd probably `touch`
> and `rm` a file to use as a semaphore to know if the process is
> already running )