File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -1220,6 +1220,9 @@ async def notify_org_admins_of_auto_paused_crawl(
12201220 org : Organization ,
12211221 ):
12221222 """Send email to all org admins about automatically paused crawl"""
1223+ if await self .get_auto_paused_emails_sent (crawl_id , org ):
1224+ return
1225+
12231226 users = await self .orgs .get_users_for_org (org , UserRole .OWNER )
12241227 workflow = await self .crawl_configs .get_crawl_config_out (cid , org )
12251228
Original file line number Diff line number Diff line change @@ -1654,12 +1654,7 @@ async def update_crawl_state(
16541654 allowed_from = RUNNING_AND_WAITING_STATES ,
16551655 )
16561656
1657- if (
1658- paused_state != "paused"
1659- and not await self .crawl_ops .get_auto_paused_emails_sent (
1660- crawl .id , crawl .org
1661- )
1662- ):
1657+ if paused_state != "paused" :
16631658 await self .crawl_ops .notify_org_admins_of_auto_paused_crawl (
16641659 paused_reason = paused_state ,
16651660 crawl_id = crawl .id ,
You can’t perform that action at this time.
0 commit comments