Skip to content

Commit

Permalink
profiling tools integration
Browse files Browse the repository at this point in the history
Former-commit-id: d63b14ed02fde746c17700775f9522b51eded567 [formerly 62fdbde1ac7afd2093d3cb0ec69a736d0f5f8372] [formerly cfded52177ad9a9f2e424ab569dae914afbc6a22 [formerly ce92e5d519b44f1397435e46c86281b30f8f0f5f]]
Former-commit-id: cdd81679289eb32b9d209975f48dd835794db0cd [formerly d790747d3d1ecd01236676e8f229fc939c9e7879]
Former-commit-id: 497d5d70562298f0332b7ad1d0fcf296ccb73c01
  • Loading branch information
proserve committed Sep 27, 2015
1 parent 4774439 commit d4d5c79
Show file tree
Hide file tree
Showing 5 changed files with 804 additions and 5 deletions.
1 change: 1 addition & 0 deletions app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ libraries:

builtins:
- remote_api: on
- appstats: on #/_ah/stats/
includes:
- mapreduce/include.yaml
handlers:
Expand Down
8 changes: 8 additions & 0 deletions appengine_config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from google.appengine.ext.appstats import recording

appstats_CALC_RPC_COSTS = True


def webapp_add_wsgi_middleware(app):
app = recording.appstats_wsgi_middleware(app)
return app
6 changes: 2 additions & 4 deletions ioendpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -2735,10 +2735,8 @@ def lead_filter(self, request):
name='leads.listv2')
def lead_list_beta(self, request):
user_from_email = EndpointsHelper.require_iogrow_user()
return Lead.list(
user_from_email=user_from_email,
request=request
)
lead_list = Lead.list(user_from_email=user_from_email, request=request)
return lead_list

# leads.patch API
@endpoints.method(LeadPatchRequest, LeadSchema,
Expand Down
3 changes: 2 additions & 1 deletion iomodels/crmengine/leads.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
import endpoints

from intercom import Intercom

from profilehooks import timecall
Intercom.app_id = 's9iirr8w'
Intercom.api_key = 'ae6840157a134d6123eb95ab0770879367947ad9'

Expand Down Expand Up @@ -451,6 +451,7 @@ def get_schema(cls, user_from_email, request):
return lead_schema

@classmethod
@timecall
def list(cls, user_from_email, request):
if request.tags:
return cls.filter_by_tag(user_from_email, request)
Expand Down
Loading

0 comments on commit d4d5c79

Please sign in to comment.