Skip to content

Commit a41faca

Browse files
committed
add initial status documentation
1 parent 2a6e64e commit a41faca

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Reindexing Status Documentation
2+
3+
### Reindexing Not Needed
4+
- Variable name: `REINDEXING_NOT_NEEDED` (1)
5+
- Default status for new collections
6+
- Applied to collections in early workflow stages (research, engineering, etc.)
7+
8+
### Reindexing Needed on LRM Dev
9+
- Variable name: `REINDEXING_NEEDED_ON_DEV` (2)
10+
- Indicates collections that need to be reindexed on LRM Dev environment
11+
- For collections that have already been indexed on production
12+
13+
### Reindexing Finished on LRM Dev
14+
- Variable name: `REINDEXING_FINISHED_ON_DEV` (3)
15+
- For collections that have completed reindexing on LRM Dev
16+
- Currently managed manually by LRM team via admin interface
17+
18+
### Ready for Curation
19+
- Variable name: `REINDEXING_READY_FOR_CURATION` (4)
20+
- Automatically set when:
21+
- A collection's dump URLs are migrated to delta URLs AND there are curated URLs present
22+
- Triggered by Collection.migrate_dump_to_delta() method
23+
24+
### Curated
25+
- Variable name: `REINDEXING_CURATED` (5)
26+
- Automatically set when:
27+
- Delta URLs are promoted to curated URLs AND there are curated URLs present
28+
- Triggered by Collection.promote_to_curated() method
29+
30+
### Indexed on Prod
31+
- Variable name: `REINDEXING_INDEXED_ON_PROD` (6)
32+
- Currently managed manually via command line
33+
- Future: Will be set automatically via plugin ping
34+
35+
### Key Code Locations for Automatic Changes
36+
37+
1. In migrate_dump_to_delta():
38+
```python
39+
# After migrating, check if we should update reindexing status
40+
curated_urls_count = self.curated_urls.count()
41+
if curated_urls_count > 0:
42+
self.reindexing_status = ReindexingStatusChoices.REINDEXING_READY_FOR_CURATION
43+
self.save()
44+
```
45+
46+
2. In promote_to_curated():
47+
```python
48+
# After promoting, check if we should update reindexing status
49+
curated_urls_count = self.curated_urls.count()
50+
if curated_urls_count > 0:
51+
self.reindexing_status = ReindexingStatusChoices.REINDEXING_CURATED
52+
self.save()
53+
```
54+
55+
Note: All status changes are logged in the ReindexingHistory model for tracking purposes.

0 commit comments

Comments
 (0)