Skip to content

Commit 6912910

Browse files
committed
Remove crawl_id to crawlId
1 parent 630351b commit 6912910

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

backend/btrixcloud/crawl_logs.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,31 +33,31 @@ async def init_index(self):
3333
"""init index for crawl logs"""
3434
await self.logs.create_index(
3535
[
36-
("crawl_id", pymongo.HASHED),
36+
("crawlId", pymongo.HASHED),
3737
("oid", pymongo.ASCENDING),
3838
("qaRunId", pymongo.ASCENDING),
3939
("timestamp", pymongo.ASCENDING),
4040
]
4141
)
4242
await self.logs.create_index(
4343
[
44-
("crawl_id", pymongo.HASHED),
44+
("crawlId", pymongo.HASHED),
4545
("oid", pymongo.ASCENDING),
4646
("qaRunId", pymongo.ASCENDING),
4747
("logLevel", pymongo.ASCENDING),
4848
]
4949
)
5050
await self.logs.create_index(
5151
[
52-
("crawl_id", pymongo.HASHED),
52+
("crawlId", pymongo.HASHED),
5353
("oid", pymongo.ASCENDING),
5454
("qaRunId", pymongo.ASCENDING),
5555
("context", pymongo.ASCENDING),
5656
]
5757
)
5858
await self.logs.create_index(
5959
[
60-
("crawl_id", pymongo.HASHED),
60+
("crawlId", pymongo.HASHED),
6161
("oid", pymongo.ASCENDING),
6262
("qaRunId", pymongo.ASCENDING),
6363
("message", pymongo.ASCENDING),
@@ -87,7 +87,7 @@ async def add_log_line(
8787

8888
log_to_add = CrawlLogLine(
8989
id=uuid4(),
90-
crawl_id=crawl_id,
90+
crawlId=crawl_id,
9191
oid=oid,
9292
qaRunId=qa_run_id,
9393
timestamp=log_dict["timestamp"],
@@ -127,7 +127,7 @@ async def get_crawl_logs(
127127

128128
match_query: Dict[str, Any] = {
129129
"oid": org.id,
130-
"crawl_id": crawl_id,
130+
"crawlId": crawl_id,
131131
"qaRunId": qa_run_id,
132132
}
133133

backend/btrixcloud/crawls.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1128,6 +1128,7 @@ async def get_crawl_logs(
11281128
sort_direction: int = -1,
11291129
contexts: Optional[List[str]] = None,
11301130
log_levels: Optional[List[str]] = None,
1131+
qa_run_id: Optional[str] = None,
11311132
) -> Tuple[list[CrawlLogLine], int]:
11321133
"""get crawl logs"""
11331134
return await self.log_ops.get_crawl_logs(
@@ -1139,6 +1140,7 @@ async def get_crawl_logs(
11391140
sort_direction=sort_direction,
11401141
contexts=contexts,
11411142
log_levels=log_levels,
1143+
qa_run_id=qa_run_id,
11421144
)
11431145

11441146

backend/btrixcloud/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1151,7 +1151,7 @@ class CrawlLogLine(BaseMongoModel):
11511151

11521152
id: UUID
11531153

1154-
crawl_id: str
1154+
crawlId: str
11551155
oid: UUID
11561156

11571157
qaRunId: Optional[str] = None

0 commit comments

Comments
 (0)