Merge "Avoid naming time type module the same as a builtin"

This commit is contained in:
Jenkins
2014-08-12 21:48:34 +00:00
committed by Gerrit Code Review
8 changed files with 10 additions and 10 deletions

View File

@@ -20,7 +20,7 @@ import six
from taskflow.conductors import base from taskflow.conductors import base
from taskflow import exceptions as excp from taskflow import exceptions as excp
from taskflow.listeners import logging as logging_listener from taskflow.listeners import logging as logging_listener
from taskflow.types import time as tt from taskflow.types import timing as tt
from taskflow.utils import lock_utils from taskflow.utils import lock_utils
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)

View File

@@ -23,7 +23,7 @@ from taskflow.engines.worker_based import cache
from taskflow.engines.worker_based import protocol as pr from taskflow.engines.worker_based import protocol as pr
from taskflow.engines.worker_based import proxy from taskflow.engines.worker_based import proxy
from taskflow import exceptions as exc from taskflow import exceptions as exc
from taskflow.types import time as tt from taskflow.types import timing as tt
from taskflow.utils import async_utils from taskflow.utils import async_utils
from taskflow.utils import misc from taskflow.utils import misc
from taskflow.utils import reflection from taskflow.utils import reflection

View File

@@ -23,7 +23,7 @@ import six
from taskflow.engines.action_engine import executor from taskflow.engines.action_engine import executor
from taskflow import exceptions as excp from taskflow import exceptions as excp
from taskflow.types import time from taskflow.types import timing as tt
from taskflow.utils import misc from taskflow.utils import misc
from taskflow.utils import reflection from taskflow.utils import reflection
@@ -194,7 +194,7 @@ class Request(Message):
self._arguments = arguments self._arguments = arguments
self._progress_callback = progress_callback self._progress_callback = progress_callback
self._kwargs = kwargs self._kwargs = kwargs
self._watch = time.StopWatch(duration=timeout).start() self._watch = tt.StopWatch(duration=timeout).start()
self._state = WAITING self._state = WAITING
self.result = futures.Future() self.result = futures.Future()

View File

@@ -33,7 +33,7 @@ from taskflow.openstack.common import excutils
from taskflow.openstack.common import jsonutils from taskflow.openstack.common import jsonutils
from taskflow.openstack.common import uuidutils from taskflow.openstack.common import uuidutils
from taskflow import states from taskflow import states
from taskflow.types import time from taskflow.types import timing as tt
from taskflow.utils import kazoo_utils from taskflow.utils import kazoo_utils
from taskflow.utils import lock_utils from taskflow.utils import lock_utils
from taskflow.utils import misc from taskflow.utils import misc
@@ -587,7 +587,7 @@ class ZookeeperJobBoard(jobboard.NotifyingJobBoard):
# Wait until timeout expires (or forever) for jobs to appear. # Wait until timeout expires (or forever) for jobs to appear.
watch = None watch = None
if timeout is not None: if timeout is not None:
watch = time.StopWatch(duration=float(timeout)).start() watch = tt.StopWatch(duration=float(timeout)).start()
self._job_cond.acquire() self._job_cond.acquire()
try: try:
while True: while True:

View File

@@ -21,7 +21,7 @@ import logging
from taskflow import exceptions as exc from taskflow import exceptions as exc
from taskflow.listeners import base from taskflow.listeners import base
from taskflow import states from taskflow import states
from taskflow.types import time from taskflow.types import timing as tt
STARTING_STATES = (states.RUNNING, states.REVERTING) STARTING_STATES = (states.RUNNING, states.REVERTING)
FINISHED_STATES = base.FINISH_STATES + (states.REVERTED,) FINISHED_STATES = base.FINISH_STATES + (states.REVERTED,)
@@ -64,7 +64,7 @@ class TimingListener(base.ListenerBase):
if state == states.PENDING: if state == states.PENDING:
self._timers.pop(task_name, None) self._timers.pop(task_name, None)
elif state in STARTING_STATES: elif state in STARTING_STATES:
self._timers[task_name] = time.StopWatch().start() self._timers[task_name] = tt.StopWatch().start()
elif state in FINISHED_STATES: elif state in FINISHED_STATES:
if task_name in self._timers: if task_name in self._timers:
self._record_ending(self._timers[task_name], task_name) self._record_ending(self._timers[task_name], task_name)

View File

@@ -20,7 +20,7 @@ import networkx as nx
from taskflow import test from taskflow import test
from taskflow.types import graph from taskflow.types import graph
from taskflow.types import time as tt from taskflow.types import timing as tt
from taskflow.types import tree from taskflow.types import tree

View File

@@ -16,7 +16,7 @@
import threading import threading
from taskflow.types import time as tt from taskflow.types import timing as tt
class Latch(object): class Latch(object):