Skip to content

Commit

Permalink
Provide an environment variable to allow mtacceptor to be used
Browse files Browse the repository at this point in the history
Mainly for tests.

Also, add a constructor option to use a custom acceptor.
  • Loading branch information
Jim Fulton committed Jul 18, 2016
1 parent 745c1b1 commit 00eb207
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/ZEO/StorageServer.py
Expand Up @@ -49,7 +49,10 @@
from ZODB.serialize import referencesf
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')

Expand Down Expand Up @@ -712,6 +715,7 @@ def __init__(self, addr, storages,
transaction_timeout=None,
ssl=None,
client_conflict_resolution=False,
Acceptor=Acceptor,
):
"""StorageServer constructor.
Expand Down

0 comments on commit 00eb207

Please sign in to comment.