Merge "Fix few spelling and grammar errors"
This commit is contained in:
@@ -32,7 +32,7 @@ def _save_as_to_mapping(save_as):
|
|||||||
Result should follow storage convention for mappings.
|
Result should follow storage convention for mappings.
|
||||||
"""
|
"""
|
||||||
# TODO(harlowja): we should probably document this behavior & convention
|
# TODO(harlowja): we should probably document this behavior & convention
|
||||||
# outside of code so that its more easily understandable, since what an
|
# outside of code so that it's more easily understandable, since what an
|
||||||
# atom returns is pretty crucial for other later operations.
|
# atom returns is pretty crucial for other later operations.
|
||||||
if save_as is None:
|
if save_as is None:
|
||||||
return {}
|
return {}
|
||||||
|
|||||||
@@ -345,7 +345,7 @@ class ZkConnection(base.Connection):
|
|||||||
yield self._get_logbook(lb_uuid)
|
yield self._get_logbook(lb_uuid)
|
||||||
|
|
||||||
def destroy_logbook(self, lb_uuid):
|
def destroy_logbook(self, lb_uuid):
|
||||||
"""Detroy (delete) a log_book transactionally."""
|
"""Destroy (delete) a log_book transactionally."""
|
||||||
|
|
||||||
def _destroy_task_details(td_uuid, txn):
|
def _destroy_task_details(td_uuid, txn):
|
||||||
td_path = paths.join(self.task_path, td_uuid)
|
td_path = paths.join(self.task_path, td_uuid)
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ class PersistenceTestMixin(object):
|
|||||||
lb.add(fd)
|
lb.add(fd)
|
||||||
|
|
||||||
# Ensure we can't save it since its owning logbook hasn't been
|
# Ensure we can't save it since its owning logbook hasn't been
|
||||||
# saved (flow details can not exist on there own without a connection
|
# saved (flow details can not exist on their own without a connection
|
||||||
# to a logbook).
|
# to a logbook).
|
||||||
with contextlib.closing(self._get_connection()) as conn:
|
with contextlib.closing(self._get_connection()) as conn:
|
||||||
self.assertRaises(exc.NotFound, conn.get_logbook, lb_id)
|
self.assertRaises(exc.NotFound, conn.get_logbook, lb_id)
|
||||||
@@ -97,8 +97,8 @@ class PersistenceTestMixin(object):
|
|||||||
fd.add(td)
|
fd.add(td)
|
||||||
|
|
||||||
# Ensure we can't save it since its owning logbook hasn't been
|
# Ensure we can't save it since its owning logbook hasn't been
|
||||||
# saved (flow details/task details can not exist on there own without
|
# saved (flow details/task details can not exist on their own without
|
||||||
# there parent existing).
|
# their parent existing).
|
||||||
with contextlib.closing(self._get_connection()) as conn:
|
with contextlib.closing(self._get_connection()) as conn:
|
||||||
self.assertRaises(exc.NotFound, conn.update_flow_details, fd)
|
self.assertRaises(exc.NotFound, conn.update_flow_details, fd)
|
||||||
self.assertRaises(exc.NotFound, conn.update_task_details, td)
|
self.assertRaises(exc.NotFound, conn.update_task_details, td)
|
||||||
|
|||||||
@@ -251,7 +251,7 @@ class PostgresPersistenceTest(BackendPersistenceTestMixin, test.TestCase):
|
|||||||
def _reset_database(self):
|
def _reset_database(self):
|
||||||
engine = None
|
engine = None
|
||||||
try:
|
try:
|
||||||
# Postgres can't operate on the database its connected to, thats
|
# Postgres can't operate on the database it's connected to, that's
|
||||||
# why we connect to the default template database 'template1' and
|
# why we connect to the default template database 'template1' and
|
||||||
# then drop and create the desired database.
|
# then drop and create the desired database.
|
||||||
db_uri = _get_connect_string('postgres', USER, PASSWD,
|
db_uri = _get_connect_string('postgres', USER, PASSWD,
|
||||||
|
|||||||
@@ -31,6 +31,6 @@ def get_optimal_thread_count():
|
|||||||
return multiprocessing.cpu_count() + 1
|
return multiprocessing.cpu_count() + 1
|
||||||
except NotImplementedError:
|
except NotImplementedError:
|
||||||
# NOTE(harlowja): apparently may raise so in this case we will
|
# NOTE(harlowja): apparently may raise so in this case we will
|
||||||
# just setup two threads since its hard to know what else we
|
# just setup two threads since it's hard to know what else we
|
||||||
# should do in this situation.
|
# should do in this situation.
|
||||||
return 2
|
return 2
|
||||||
|
|||||||
Reference in New Issue
Block a user