Silly question (I hope)

1 view
Skip to first unread message

ralsina

unread,
May 15, 2007, 7:09:34 PM5/15/07
to colubrid-users
Hello!

I have been reading the docs for a couple of hours and I simply can't
find an answer to this:

How can I **stop** colubrid from inside the application?

The current code used to run the app is here:

http://ra-blog.googlecode.com/svn/trunk/BartleBlog/backend/web.py

Since I will run this in a thread in a desktop app, I want a way to
stop it when the user wants to quit.

BTW: I am using it for page previews in a desktop blogging tool...
Colubrid is pretty cool!

Blog post about it here: http://lateral.netmanagers.com.ar/weblog/2007/05/15.html#BB576

Armin Ronacher

unread,
May 22, 2007, 6:54:55 PM5/22/07
to colubri...@googlegroups.com
Hi,

ralsina wrote:
> Hello!
>
> I have been reading the docs for a couple of hours and I simply can't
> find an answer to this:
>
> How can I **stop** colubrid from inside the application?

You cannot "stop" colubrid. But there are ways to stop the server it's
served in. Simplest way is grabing a reference to the WSGI Server (maybe
putting it into the environment) and killing it. Which WSGI Server are
you using?

Regards,
Armin

ralsina

unread,
May 23, 2007, 5:17:04 PM5/23/07
to colubrid-users

I suppose paste's, but I am not sure. How can I found that out?

Armin Ronacher

unread,
May 25, 2007, 10:09:06 AM5/25/07
to colubri...@googlegroups.com
Hi,

Pass the application to a specific WSGI server. For example paste. The
colubrid execute function just tries a couple of WSGI servers.

But I don't think that any of the current existing WSGI servers provide
a functionallity to shut them down. Maybe raising KeyboardInterrupt
could help.

Regards,
Armin

Reply all
Reply to author
Forward
0 new messages