Doc tweaks.
This commit is contained in:
2
AUTHORS
2
AUTHORS
@@ -5,7 +5,7 @@ Original Authors
|
||||
|
||||
Contributors
|
||||
------------
|
||||
* R. Tyler Ballance
|
||||
* R\. Tyler Ballance
|
||||
* Denis Bilenko
|
||||
* AG Projects
|
||||
* Mike Barton
|
||||
|
@@ -91,7 +91,7 @@ Here's a somewhat contrived example: a server that receives POSTs from clients t
|
||||
|
||||
The full version of this example is in the :ref:`feed_scraper_example`, which includes code to start the WSGI server on a particular port.
|
||||
|
||||
This example uses a global (gasp) :class:`GreenPool <eventlet.greenpool.GreenPool>` to control concurrency. If we didn't have a global limit on the number of outgoing requests, then a client could cause the server to open tens of thousands of concurrent connections to external servers, thereby getting feedparser's IP banned, or various other accidental-or-on-purpose bad behavior. The pool isn't a complete DoS protection, but it's the bare minimum.
|
||||
This example uses a global (gasp) :class:`GreenPool <eventlet.greenpool.GreenPool>` to control concurrency. If we didn't have a global limit on the number of outgoing requests, then a client could cause the server to open tens of thousands of concurrent connections to external servers, thereby getting feedscraper's IP banned, or various other accidental-or-on-purpose bad behavior. The pool isn't a complete DoS protection, but it's the bare minimum.
|
||||
|
||||
.. highlight:: python
|
||||
:linenothreshold: 1
|
||||
|
@@ -3,7 +3,7 @@
|
||||
|
||||
The db_pool module is useful for managing database connections. It provides three primary benefits: cooperative yielding during database operations, concurrency limiting to a database host, and connection reuse. db_pool is intended to be database-agnostic, compatible with any DB-API 2.0 database module.
|
||||
|
||||
*Caveat: however, it has currently only been tested and used with MySQLdb.*
|
||||
*It has currently been tested and used with both MySQLdb and psycopg2.*
|
||||
|
||||
A ConnectionPool object represents a pool of connections open to a particular database. The arguments to the constructor include the database-software-specific module, the host name, and the credentials required for authentication. After construction, the ConnectionPool object decides when to create and sever connections with the target database.
|
||||
|
||||
|
@@ -3,7 +3,8 @@ import sys
|
||||
import errno
|
||||
from code import InteractiveConsole
|
||||
|
||||
from eventlet import api, hubs
|
||||
import eventlet
|
||||
from eventlet import hubs
|
||||
from eventlet.support import greenlets
|
||||
|
||||
try:
|
||||
@@ -106,5 +107,5 @@ def backdoor((conn, addr), locals=None):
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
backdoor_server(api.tcp_listener(('127.0.0.1', 9000)), {})
|
||||
backdoor_server(eventlet.listen(('127.0.0.1', 9000)), {})
|
||||
|
||||
|
Reference in New Issue
Block a user