mirror of
https://github.com/zulip/zulip.git
synced 2025-11-13 02:17:19 +00:00
queue_processors: Log time spent getting data for url in embed_links.
This commit is contained in:
committed by
Tim Abbott
parent
e59a2a23c3
commit
e2262b0b64
@@ -539,7 +539,9 @@ class TestWorker(QueueProcessingWorker):
|
|||||||
class FetchLinksEmbedData(QueueProcessingWorker):
|
class FetchLinksEmbedData(QueueProcessingWorker):
|
||||||
def consume(self, event: Mapping[str, Any]) -> None:
|
def consume(self, event: Mapping[str, Any]) -> None:
|
||||||
for url in event['urls']:
|
for url in event['urls']:
|
||||||
|
start_time = time.time()
|
||||||
url_preview.get_link_embed_data(url)
|
url_preview.get_link_embed_data(url)
|
||||||
|
logging.info("Time spent on get_link_embed_data for %s: %s", url, time.time() - start_time)
|
||||||
|
|
||||||
message = Message.objects.get(id=event['message_id'])
|
message = Message.objects.get(id=event['message_id'])
|
||||||
# If the message changed, we will run this task after updating the message
|
# If the message changed, we will run this task after updating the message
|
||||||
|
|||||||
Reference in New Issue
Block a user