cookbook
cookbook copied to clipboard
Reindex in steps
Is your feature request related to a problem? Please describe. Currently, the reindex of the JSON files happens on a regular time schedule (defined by a config variable).
As the instance is growing, this can lead to problems once the reindex takes longer than the timeout of the HTTP server, and no page of the cookbook app can be served anymore in time. Additionally, the app gets laggy in these cases.
Describe the solution you'd like The ideal solution consists of two parts:
- A background job is used to check every 5 min if any recipes have to be reindexed (of any user).
- The reindex is limited to a certain number of recipes to index. Something like 50 or 100 recipes maximum. The recipes should age (date of last reindex in DB) and once the recipe is old enough a reindex could take place. Due to the regular checks (see point 1) the recipes will soon be indexed completely.
Manual reindex could be enhanced by adding a visual indicator about the progress of the indexing.