Re: closing a connection from "outside" an application (for testing)
Eli Collins <[email protected]>
| Newsgroups | gmane.comp.python.db.psycopg.devel |
|---|---|
| Message-ID | <[email protected]> |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Webb Sprague wrote:
>
> Is there a way for psycopg to return the PID of the process it is
> connected to, primarily for logging (and killing)? I am still trying
> to figure out how to stop a run of my program in mid-stream (besides a
> sleep() or waiting on a signal...), but that will get me started.
There's this patch to psycopg,
http://www.initd.org/tracker/psycopg/ticket/163
which exposes the backend pid as "conn.backend_pid"...
sadly, that would require compiling your own patched copy of psycopg :(
- --
Eli Collins <[email protected]>
706-543-0269
- --
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHf8KhbY9ADrofCSwRAtbTAKC6aasWTIaT85hkgOWE0Igt5VTVpwCfTlUw
0Nljm+wFC0EeUSl6O1KzOCw=
=Ov96
-----END PGP SIGNATURE-----