Skip to content

fix: correctly clear startup-schedule when recrawl job is stopped (#766) - #772

Open
songproducer wants to merge 1 commit into
yacy:masterfrom
songproducer:fix/recrawl-restart-loop
Open

fix: correctly clear startup-schedule when recrawl job is stopped (#766)#772
songproducer wants to merge 1 commit into
yacy:masterfrom
songproducer:fix/recrawl-restart-loop

Conversation

@songproducer

Copy link
Copy Markdown
Contributor

PR #757 added auto-restart of the recrawl job on peer boot by writing event_kind=regular/event_action=startup to the API table when the job starts. On stop, it tried to clear this by calling selectLastExecutedApiCall() with the stoprecrawl POST - but that POST contains 'stoprecrawl' while the stored API URL has 'recrawlnow', so the URL-based lookup returns null and the off-switch is never written.

Fix: on stoprecrawl, scan the API table directly for any row belonging to IndexReIndexMonitor_p with event_action=startup and clear it there. This ensures that stopping the job before shutdown prevents it from auto-restarting on the next boot.

…cy#766)

PR yacy#757 added auto-restart of the recrawl job on peer boot by writing
event_kind=regular/event_action=startup to the API table when the job
starts. On stop, it tried to clear this by calling
selectLastExecutedApiCall() with the stoprecrawl POST - but that POST
contains 'stoprecrawl' while the stored API URL has 'recrawlnow', so
the URL-based lookup returns null and the off-switch is never written.

Fix: on stoprecrawl, scan the API table directly for any row belonging
to IndexReIndexMonitor_p with event_action=startup and clear it there.
This ensures that stopping the job before shutdown prevents it from
auto-restarting on the next boot.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant