The items are re-indexing on each cron run

Created on 20 November 2024, 1 day ago

On each cron run the index is re-indexed.

The implemented hook_cron executes the SyncService which triggers a re-index.

The Items should be re-indexed only if the strategy list is changed.

🐛 Bug report
Status

Active

Version

2.1

Component

Code

Created by

🇷🇴Romania cslevy

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @cslevy
  • 🇷🇴Romania cslevy

    I created a patch which fixes this issue.

    I created a mechanism to check if any strategy was added/removed, and only then the index is flagged for re-indexing.

    Also changed the hook_cron to hook_rebuild. When a new strategy is created and added to the service, a cache rebuild is required. So it's enough to run the Sync service only then, not on cron.

  • 🇷🇴Romania cslevy

    Accidentally I left some debugging in the first patch. Here is a new one

Production build 0.71.5 2024