SHARE
TWEET

Untitled

a guest Sep 18th, 2019 97 in 11 hours
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @newrelic.agent.function_trace()
  2. @async_timer
  3. async def _make_dependent_calls(self, requests):
  4.     """Makes calls to services that the requested service depends_on and returns
  5.        the requested data"""
  6.     queries = []
  7.     self.view.trace.add_event(f'Starting dependent calls: {(requests)}', span_id=self.span_id)
  8.  
  9.     for req in requests:
  10.         req = req.copy()
  11.         del req['provides']
  12.         dependent_span_id = self.view.trace.start_span(self.span_id)
  13.         new_job = RetrieveJob(self.view, req, dependent_span_id, dependent=True)
  14.         queries.append(new_job.retrieve())
  15.  
  16.     results = await asyncio.gather(*queries)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top