[ckan-dev] Virtualenv tips: how to reload the ini file

Nigel Babu nigel.babu at okfn.org
Fri Jun 13 03:41:24 UTC 2014


Hi John,

I'm not sure what you're trying to do here. Why is there an existing python
process? If you're running CKAN development server with paster, you should kill
your existing sessions before disconnecting or run it over screen/tmux. If
you're not using screen/tmux, it should be killed automatically anyway.

What paster serve --reload does is reload the CKAN configuration and code if
any of the code or configuration changes. Though, I have to warn you, it
doesn't recognize new files. Template changes will not be re-loaded, because it
doesn't need to be.

On Thu, Jun 12, 2014 at 03:01:28PM +1000, John Brisbin wrote:
> G'Day all,
>
> Thanks to some kindly orientation help from Jason Tan, I have
> managed to get python to reload the development.ini file and proceed
> onward on the path to creating a custom theme....but not without
> some lingering confusion.
>
> This is a request for advice on how to manage the virtualenv
> sessions properly.
>
> Starting from a fresh PuTTY login, I run $ netstat -lntp and can see
> that there's an existing Python process on a given PID (let's say
> 4506)
>
> (1) If I open another shell, activate a virtualenv (.
> /usr/lib/ckan/default/bin/activate), and try to run the paster
> command:
>
> paster serve --reload /etc/ckan/default/development.ini
>
> we will get the message that the server is starting in some other
> socket (eg 5304), and then will get the socket Errno 98 Address
> already in use.
>
> (2) If I kill the python process manually, and then re-run the
> paster command, the server appears to reload the ini file and start
> itself normally.
>
> It doesn't seem right that I have to manually kill Python before
> being able to run the --reload, but, given that Python should always
> be running, and I don't know how to join (or leave) an existing
> virtualenv session, I'm not sure what else to do.
>
> Thanks for any pointers!
>
> Kind regards,
>
> JB
>
>
>
> --
> John Brisbin
> Managing Director, BoaB interactive Pty Ltd
> POB 248, MT Molloy QLD 4871
>
> E: john at boab.info
> M: 0407 471 565 | P: 07 4094 2172
> Skype: boabjohn | Twitter: @boabjohn
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev

--
Nigel Babu
Developer, Open Knowledge



More information about the ckan-dev mailing list