mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-04-27 03:00:12 -04:00
scraper_q: Add timer to embedly oEmbed API call.
This gives us visibility on the response times of the embedly API which can help debugging when the scraper_q is slow.
This commit is contained in:
@@ -565,7 +565,12 @@ class _EmbedlyScraper(Scraper):
|
||||
|
||||
param_dict.update(self.embedly_params)
|
||||
params = urllib.urlencode(param_dict)
|
||||
|
||||
timer = g.stats.get_timer("providers.embedly.oembed")
|
||||
timer.start()
|
||||
content = requests.get(self.EMBEDLY_API_URL + "?" + params).content
|
||||
timer.stop()
|
||||
|
||||
return json.loads(content)
|
||||
|
||||
def _make_media_object(self, oembed):
|
||||
|
||||
Reference in New Issue
Block a user