From d5e317baa01ce639960bb65f80b903d10503c0c8 Mon Sep 17 00:00:00 2001 From: Michael Hanselmann <hansmi@google.com> Date: Mon, 11 Aug 2008 16:27:14 +0000 Subject: [PATCH] jqueue: Change log message time format See the comment in the patch. Reviewed-by: ultrotter --- lib/cli.py | 2 +- lib/jqueue.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/cli.py b/lib/cli.py index cce3b3107..e0ca5ff5c 100644 --- a/lib/cli.py +++ b/lib/cli.py @@ -421,7 +421,7 @@ def PollJob(job_id, cl=None, feedback_fn=None): if callable(feedback_fn): feedback_fn(msg) else: - print "%s %s" % (time.ctime(msg[0]), msg[2]) + print "%s %s" % (time.ctime(utils.MergeTime(msg[0])), msg[2]) lastmsg = msg time.sleep(1) diff --git a/lib/jqueue.py b/lib/jqueue.py index cbf43df88..9f9709a37 100644 --- a/lib/jqueue.py +++ b/lib/jqueue.py @@ -98,7 +98,9 @@ class _QueuedOpCode(object): self._log_lock.acquire() try: - self.log.append((time.time(), log_type, log_msg)) + # The time is split to make serialization easier and not lose more + # precision. + self.log.append((utils.SplitTime(time.time()), log_type, log_msg)) finally: self._log_lock.release() -- GitLab