Skip to content

Commit 9a86494

Browse files
committed
fix: run read_email in a thread to avoid blocking event loop (CM-1318)
Signed-off-by: Uroš Marolt <uros@marolt.me>
1 parent 1d2fcb8 commit 9a86494

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • services/apps/mailing_list_integration/src/crowdmail/worker

services/apps/mailing_list_integration/src/crowdmail/worker/list_worker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ async def _process_single_list(self, mailing_list: MailingList):
9393
for git_id in commit_ids:
9494
heads[shard] = git_id
9595
try:
96-
message, blob_id = read_email(shard_path, git_id)
96+
message, blob_id = await asyncio.to_thread(read_email, shard_path, git_id)
9797
parsed = parse_email(
9898
message,
9999
mailing_list.source_url,

0 commit comments

Comments
 (0)