This repository was archived by the owner on Nov 26, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +9
-14
lines changed
Expand file tree Collapse file tree 3 files changed +9
-14
lines changed Original file line number Diff line number Diff line change @@ -35,14 +35,7 @@ web: db
3535 @echo " ------------------------------------------------------------------"
3636 @echo " Running in production mode"
3737 @echo " ------------------------------------------------------------------"
38- @docker compose -p $(PROJECT_ID ) up -d --scale uwsgi=2 web worker beat
39-
40- dbbackups : db
41- @echo
42- @echo " ------------------------------------------------------------------"
43- @echo " Running dbbackups in production mode"
44- @echo " ------------------------------------------------------------------"
45- @docker compose -p $(PROJECT_ID ) up -d dbbackups
38+ @docker compose -p $(PROJECT_ID ) up -d --scale uwsgi=2 web worker beat dbbackups
4639
4740certbot : web
4841 @echo
Original file line number Diff line number Diff line change 11from celery import shared_task
2+ from haystack .management .commands import update_index
23from celery .utils .log import get_task_logger
34
45logger = get_task_logger (__name__ )
56
6-
77@shared_task
8- def rebuild_index ():
9- import subprocess
10- subprocess .call (['python' , 'manage.py' , 'rebuild_index' ])
8+ def rebuild_search_index ():
9+ """
10+ Celery task to rebuild the search index.
11+ """
12+ update_index .Command ().handle ()
Original file line number Diff line number Diff line change 160160 # Index synchronization sometimes fails when deleting
161161 # a plugin and None is listed in the search list. So I think
162162 # it would be better if we rebuild the index frequently
163- 'rebuild_index ' : {
164- 'task' : 'plugins.tasks.rebuild_index.rebuild_index ' ,
163+ 'rebuild_search_index ' : {
164+ 'task' : 'plugins.tasks.rebuild_search_index.rebuild_search_index ' ,
165165 'schedule' : crontab (minute = 0 , hour = 3 ), # Execute every day at 3 AM.
166166 }
167167}
You can’t perform that action at this time.
0 commit comments