File tree 6 files changed +20
-1
lines changed
6 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -224,6 +224,7 @@ class UserOut(BaseModel):
224
224
"stopped_by_user" ,
225
225
"stopped_storage_quota_reached" ,
226
226
"stopped_time_quota_reached" ,
227
+ "stopped_org_readonly" ,
227
228
]
228
229
SUCCESSFUL_STATES = get_args (TYPE_SUCCESSFUL_STATES )
229
230
Original file line number Diff line number Diff line change @@ -1242,6 +1242,9 @@ async def is_crawl_stopping(
1242
1242
# gracefully stop crawl if current running crawl sizes reach storage quota
1243
1243
org = await self .org_ops .get_org_by_id (crawl .oid )
1244
1244
1245
+ if org .readOnly :
1246
+ return "stopped_org_readonly"
1247
+
1245
1248
if org .quotas .storageQuota :
1246
1249
running_crawls_total_size = status .size
1247
1250
for crawl_job in data .related [CJS ].values ():
@@ -1366,6 +1369,8 @@ async def update_crawl_state(
1366
1369
state = "stopped_storage_quota_reached"
1367
1370
elif status .stopReason == "stopped_time_quota_reached" :
1368
1371
state = "stopped_time_quota_reached"
1372
+ elif status .stopReason == "stopped_org_readonly" :
1373
+ state = "stopped_org_readonly"
1369
1374
else :
1370
1375
state = "complete"
1371
1376
Original file line number Diff line number Diff line change 21
21
"size-limit" ,
22
22
"stopped_storage_quota_reached" ,
23
23
"stopped_time_quota_reached" ,
24
+ "stopped_org_readonly" ,
24
25
]
25
26
26
27
Original file line number Diff line number Diff line change @@ -228,6 +228,16 @@ export class CrawlStatus extends TailwindElement {
228
228
label = msg ( "Stopped: Time Quota Reached" ) ;
229
229
break ;
230
230
231
+ case "stopped_org_readonly" :
232
+ color = "var(--warning)" ;
233
+ icon = html `< sl-icon
234
+ name ="exclamation-square-fill "
235
+ slot ="prefix "
236
+ style ="color: ${ color } "
237
+ > </ sl-icon > ` ;
238
+ label = msg ( "Stopped: Crawling Disabled" ) ;
239
+ break ;
240
+
231
241
case "canceled" :
232
242
color = "var(--sl-color-orange-600)" ;
233
243
icon = html `< sl-icon
Original file line number Diff line number Diff line change @@ -139,7 +139,8 @@ export type CrawlState =
139
139
| "canceled"
140
140
| "stopped_by_user"
141
141
| "stopped_storage_quota_reached"
142
- | "stopped_time_quota_reached" ;
142
+ | "stopped_time_quota_reached"
143
+ | "stopped_org_readonly" ;
143
144
144
145
// TODO maybe convert this to an enum?
145
146
export enum ReviewStatus {
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ export const finishedCrawlStates: CrawlState[] = [
21
21
"stopped_by_user" ,
22
22
"stopped_storage_quota_reached" ,
23
23
"stopped_time_quota_reached" ,
24
+ "stopped_org_readonly" ,
24
25
] ;
25
26
26
27
export const inactiveCrawlStates : CrawlState [ ] = [
You can’t perform that action at this time.
0 commit comments