Skip to content

Commit 8298fda

Browse files
committed
Add print logging to help figure out bug
1 parent c15c1ec commit 8298fda

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

backend/btrixcloud/operator/crawls.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1534,13 +1534,22 @@ async def update_crawl_state(
15341534
results = await redis.hgetall(f"{crawl.id}:status")
15351535
stats, sizes = await self.get_redis_crawl_stats(redis, crawl.id)
15361536

1537+
print(f"crawl.paused_at: {crawl.paused_at}", flush=True)
1538+
print(f"crawl.stopping: {crawl.stopping}", flush=True)
1539+
print(f"status.stopReason: {status.stopReason}", flush=True)
1540+
1541+
print(f"stats.size initial: {stats.size}", flush=True)
1542+
print(f"status.filesAddedSize: {statys.filesAddedSize}", flush=True)
1543+
15371544
# need to add size of previously completed WACZ files as well!
15381545
# TODO: This sometimes results in the crawl's stats.size being
15391546
# twice as large as expected when pausing crawls, as stats.size
15401547
# is not necessarily decremented once WACZ files are uploaded
15411548
# This then can have a downstream effects on the storage quota check
15421549
stats.size += status.filesAddedSize
15431550

1551+
print(f"stats.size after adding filesAddedSize: {stats.size}", flush=True)
1552+
15441553
# update status
15451554
status.pagesDone = stats.done
15461555
status.pagesFound = stats.found

0 commit comments

Comments
 (0)