Chromium Code Reviews| Index: appengine/cr-buildbucket/api.py |
| diff --git a/appengine/cr-buildbucket/api.py b/appengine/cr-buildbucket/api.py |
| index 13f66d7103bdeadf5148d3b147206d6e4b39f908..0dca1a3f6c4e91219c001d29686a7c42a98fccc0 100644 |
| --- a/appengine/cr-buildbucket/api.py |
| +++ b/appengine/cr-buildbucket/api.py |
| @@ -2,7 +2,6 @@ |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| -import datetime |
| import functools |
| import json |
| import logging |
| @@ -14,6 +13,7 @@ from components import utils |
| from protorpc import messages |
| from protorpc import message_types |
| from protorpc import remote |
| +import gae_ts_mon |
| import endpoints |
| import errors |
| @@ -172,6 +172,9 @@ def buildbucket_api_method( |
| request_message_class, response_message_class, **kwargs) |
| def decorator(fn): |
| + def ts_mon_time(): |
| + return utils.datetime_to_timestamp(utils.utcnow()) / 1000000.0 |
| + fn = gae_ts_mon.instrument_endpoint(time_fn=ts_mon_time)(fn) |
|
Sergey Berezin
2016/04/18 22:45:16
You shouldn't need to specify time here - it's onl
|
| fn = catch_errors(fn, response_message_class) |
| fn = endpoints_decorator(fn) |
| fn = ndb.toplevel(fn) |