cookbook icon indicating copy to clipboard operation
cookbook copied to clipboard

Reindex in steps

Open christianlupus opened this issue 4 years ago • 1 comments

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:

  1. A background job is used to check every 5 min if any recipes have to be reindexed (of any user).
  2. 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.

christianlupus avatar Feb 24 '21 18:02 christianlupus

Manual reindex could be enhanced by adding a visual indicator about the progress of the indexing.

christianlupus avatar Jul 28 '22 21:07 christianlupus