[IPython-dev] Use bash traps to automatically remove ipcontroller/engine pid (or json) files
Alex Gaudio
adgaudio at gmail.com
Mon Mar 11 20:52:25 EDT 2013
Hello all,
I've been using bash traps to automatically remove pid (and json) files
when an ipcontroller crashes or is forcibly shutdown. They've proven
extremely useful for me. Do you think it's worth integrating this
functionality into IPython by default? If so, any ideas how one could
integrate this?
A bash trap could look like this:
* /bin/bash -c "trap 'rm {pid_fp} {json_fp} ' EXIT {ipcontroller_cmd}"
*
where
pid_fp could be "~/.ipython/profile_default/pid/ipcontroller.pid"
json_fp could be
"~/.ipython/profile_default/security/ipcontroller-{client,engine}.json"
ipcontroller_cmd could be "ipcontroller"
** I find this is particularly useful in conjunction with the --cluster-id
option to manage continuous code deploys.
Thanks for your time!
Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20130311/3c2a401f/attachment.html>
More information about the IPython-dev
mailing list