Changeset 140652 in webkit


Ignore:
Timestamp:
Jan 23, 2013 9:49:31 PM (11 years ago)
Author:
commit-queue@webkit.org
Message:

QueueStatusServer crashes in production on next-patch
https://bugs.webkit.org/show_bug.cgi?id=107775

Patch by Alan Cutter <alancutter@chromium.org> on 2013-01-23
Reviewed by Adam Barth.

Replaced Python 2.5 incompatible call to timedelta.total_seconds().

  • QueueStatusServer/app.yaml:
  • QueueStatusServer/model/patchlog.py:

(PatchLog.calculate_wait_duration):
(PatchLog.calculate_process_duration):
(PatchLog):
(PatchLog._time_delta_to_seconds):

Location:
trunk/Tools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r140641 r140652  
     12013-01-23  Alan Cutter  <alancutter@chromium.org>
     2
     3        QueueStatusServer crashes in production on next-patch
     4        https://bugs.webkit.org/show_bug.cgi?id=107775
     5
     6        Reviewed by Adam Barth.
     7
     8        Replaced Python 2.5 incompatible call to timedelta.total_seconds().
     9
     10        * QueueStatusServer/app.yaml:
     11        * QueueStatusServer/model/patchlog.py:
     12        (PatchLog.calculate_wait_duration):
     13        (PatchLog.calculate_process_duration):
     14        (PatchLog):
     15        (PatchLog._time_delta_to_seconds):
     16
    1172013-01-23  Ryosuke Niwa  <rniwa@webkit.org>
    218
  • trunk/Tools/QueueStatusServer/app.yaml

    r140513 r140652  
    11application: webkit-commit-queue
    2 version: 107612 # Bugzilla bug ID of last major change
     2version: 107775 # Bugzilla bug ID of last major change
    33runtime: python
    44api_version: 1
  • trunk/Tools/QueueStatusServer/model/patchlog.py

    r140513 r140652  
    5050    def calculate_wait_duration(self):
    5151        time_delta = datetime.utcnow() - self.date
    52         self.wait_duration = int(time_delta.total_seconds())
     52        self.wait_duration = int(self._time_delta_to_seconds(time_delta))
    5353
    5454    def calculate_process_duration(self):
    5555        if self.wait_duration:
    5656            time_delta = datetime.utcnow() - self.date
    57             self.process_duration = int(time_delta.total_seconds()) - self.wait_duration
     57            self.process_duration = int(self._time_delta_to_seconds(time_delta)) - self.wait_duration
     58
     59    # Needed to support Python 2.5's lack of timedelta.total_seconds().
     60    @classmethod
     61    def _time_delta_to_seconds(cls, time_delta):
     62        return time_delta.seconds + time_delta.days * 24 * 3600
Note: See TracChangeset for help on using the changeset viewer.