Skip to content

Commit 150edf2

Browse files
committed
One more go at typing
1 parent c7b578f commit 150edf2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

backend/btrixcloud/operator/crawls.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import os
55
import math
66
from pprint import pprint
7-
from typing import Optional, Any, Sequence
7+
from typing import Optional, Any, Sequence, Literal
88
from datetime import datetime, timedelta
99
from uuid import UUID
1010

@@ -827,10 +827,10 @@ async def fail_crawl(
827827
"""Mark crawl as failed, log crawl state and print crawl logs, if possible"""
828828
prev_state = status.state
829829

830+
failed_state: Literal["failed", "failed_not_logged_in"] = "failed"
831+
830832
if status.failReason and status.failReason == "not_logged_in":
831833
failed_state = "failed_not_logged_in"
832-
else:
833-
failed_state = "failed"
834834

835835
if not await self.mark_finished(crawl, status, failed_state, stats=stats):
836836
return False

0 commit comments

Comments
 (0)