Skip to content

Commit 5ccd39a

Browse files
tw4likreymer
authored andcommitted
One more go at typing
1 parent b2c4372 commit 5ccd39a

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

@@ -832,10 +832,10 @@ async def fail_crawl(
832832
"""Mark crawl as failed, log crawl state and print crawl logs, if possible"""
833833
prev_state = status.state
834834

835+
failed_state: Literal["failed", "failed_not_logged_in"] = "failed"
836+
835837
if status.failReason and status.failReason == "not_logged_in":
836838
failed_state = "failed_not_logged_in"
837-
else:
838-
failed_state = "failed"
839839

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

0 commit comments

Comments
 (0)