Commit 00eb2075 authored by Jim Fulton's avatar Jim Fulton

Provide an environment variable to allow mtacceptor to be used

Mainly for tests.

Also, add a constructor option to use a custom acceptor.
parent 745c1b15
...@@ -49,7 +49,10 @@ from ZODB.POSException import TransactionError, ReadOnlyError, ConflictError ...@@ -49,7 +49,10 @@ from ZODB.POSException import TransactionError, ReadOnlyError, ConflictError
from ZODB.serialize import referencesf from ZODB.serialize import referencesf
from ZODB.utils import oid_repr, p64, u64, z64 from ZODB.utils import oid_repr, p64, u64, z64
from .asyncio.server import Acceptor if os.environ.get("ZEO_MTACCEPTOR"): # mainly for tests
from .asyncio.mtacceptor import Acceptor
else:
from .asyncio.server import Acceptor
logger = logging.getLogger('ZEO.StorageServer') logger = logging.getLogger('ZEO.StorageServer')
...@@ -712,6 +715,7 @@ class StorageServer: ...@@ -712,6 +715,7 @@ class StorageServer:
transaction_timeout=None, transaction_timeout=None,
ssl=None, ssl=None,
client_conflict_resolution=False, client_conflict_resolution=False,
Acceptor=Acceptor,
): ):
"""StorageServer constructor. """StorageServer constructor.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment