diff options
| author | Joshua Harlow <harlowja@gmail.com> | 2013-11-16 02:44:14 -0800 |
|---|---|---|
| committer | Alexander Gorodnev <agorodnev@griddynamics.com> | 2013-11-21 18:38:44 +0400 |
| commit | db15db8186f73f7129d6130099dc793bf475f890 (patch) | |
| tree | c4e1c116a504f65967fbb25b7c2b718506c052c3 /taskflow/persistence/backends/impl_sqlalchemy.py | |
| parent | 359ce523f442e3c3c5f762a966e92d44c9b700ab (diff) | |
| download | taskflow-db15db8186f73f7129d6130099dc793bf475f890.tar.gz | |
Fix up python 3.3 incompatabilities
Make the python 3.3 testing work by selectively
disabling & including eventlet, switch to testtools
and testrepository which has 2.6, 2.7, 3.2+ unified
testing support so that we can correctly run our
tests in all supported python versions.
Closes-Bug: #1251660
Co-authored-by: Alexander Gorodnev <agorodnev@griddynamics.com>
Change-Id: I23b6f04387cfd3bf6b5a044edffa446ca897ce3a
Diffstat (limited to 'taskflow/persistence/backends/impl_sqlalchemy.py')
| -rw-r--r-- | taskflow/persistence/backends/impl_sqlalchemy.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/taskflow/persistence/backends/impl_sqlalchemy.py b/taskflow/persistence/backends/impl_sqlalchemy.py index 59edb86..4de6471 100644 --- a/taskflow/persistence/backends/impl_sqlalchemy.py +++ b/taskflow/persistence/backends/impl_sqlalchemy.py @@ -36,6 +36,7 @@ from taskflow.persistence.backends import base from taskflow.persistence.backends.sqlalchemy import migration from taskflow.persistence.backends.sqlalchemy import models from taskflow.persistence import logbook +from taskflow.utils import eventlet_utils from taskflow.utils import misc from taskflow.utils import persistence_utils @@ -224,7 +225,9 @@ class SQLAlchemyBackend(base.Backend): # or engine arg overrides make sure we merge them in. engine_args.update(conf.pop('engine_args', {})) engine = sa.create_engine(sql_connection, **engine_args) - if misc.as_bool(conf.pop('checkin_yield', True)): + checkin_yield = conf.pop('checkin_yield', + eventlet_utils.EVENTLET_AVAILABLE) + if misc.as_bool(checkin_yield): sa.event.listen(engine, 'checkin', _thread_yield) if 'mysql' in e_url.drivername: if misc.as_bool(conf.pop('checkout_ping', True)): |
