Skip to content

Commit d14945f

Browse files
committed
undo previous changes, just need to check for 'state' being paused
1 parent 1651da1 commit d14945f

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

backend/btrixcloud/operator/crawls.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ async def sync_crawls(self, data: MCSyncData):
360360
for i in range(0, status.scale):
361361
children.extend(
362362
self._load_crawler(
363-
params, i, status, data.children, bool(crawl.paused_at)
363+
params, i, status, data.children, status.state == "paused"
364364
)
365365
)
366366

@@ -1025,17 +1025,6 @@ def sync_pod_status(
10251025
if "containerStatuses" in pstatus:
10261026
cstatus = pstatus["containerStatuses"][0]
10271027

1028-
# don't consider 'ContainerCreating' as running for now
1029-
# may be stuck in this state for other reasons
1030-
#
1031-
# waiting = cstatus["state"].get("waiting")
1032-
# if (
1033-
# phase == "Pending"
1034-
# and waiting
1035-
# and waiting.get("reason") == "ContainerCreating"
1036-
# ):
1037-
# running = True
1038-
10391028
self.handle_terminated_pod(
10401029
name, role, status, cstatus["state"].get("terminated")
10411030
)

0 commit comments

Comments
 (0)