Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

johnsca
Copy link

@johnsca johnsca commented May 30, 2023

PR #42 added the check for expected periodic jobs to the worker health check, but that doesn't actually help because it restarts the worker process rather than the scheduler process. This creates a health check for the scheduler and moves the periodic jobs check to that. Switching the scheduler to use supervisord like the worker will likely also make it more resilient to things like Redis reboots / hiccups.

Fixes: ENG-2154

PR #42 added the check for expected periodic jobs to the worker health
check, but that doesn't actually help because it restarts the worker
process rather than the scheduler process. This creates a health check
for the scheduler and moves the periodic jobs check to that.

Fixes: [ENG-2154](https://stacklet.atlassian.net/browse/ENG-2154)
@johnsca johnsca force-pushed the johnsca/feat/ENG-2154/scheduler-health-check branch from fee65f0 to 7562eeb Compare May 31, 2023 15:25
echo "Starting RQ scheduler..."

exec /app/manage.py rq scheduler
exec supervisord -c scheduler.conf
Copy link
Author

@johnsca johnsca May 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's worth noting that this entire file is overridden in the redash-infra repo; it took me a bit to realize I needed to make this change over in https://github.com/stacklet/redash-infra/pull/117 as well.

@johnsca johnsca marked this pull request as ready for review May 31, 2023 15:26
@johnsca
Copy link
Author

johnsca commented May 31, 2023

Tested in my sandbox to confirm that the health check is running and jobs get scheduled as expected. Not sure how to test the case where a specific job drops off, but it did recover gracefully from a Redis reboot, at least. If you care to see the difference in the logs:

Copy link

@fwereade fwereade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks

@johnsca johnsca merged commit 0e8d95f into stacklet/integration Jun 1, 2023
thisisshi pushed a commit that referenced this pull request Mar 1, 2024
PR #42 added the check for expected periodic jobs to the worker health
check, but that doesn't actually help because it restarts the worker
process rather than the scheduler process. This creates a health check
for the scheduler and moves the periodic jobs check to that.

Fixes: [ENG-2154](https://stacklet.atlassian.net/browse/ENG-2154)
wgrant pushed a commit that referenced this pull request May 22, 2025
PR #42 added the check for expected periodic jobs to the worker health
check, but that doesn't actually help because it restarts the worker
process rather than the scheduler process. This creates a health check
for the scheduler and moves the periodic jobs check to that.

Fixes: [ENG-2154](https://stacklet.atlassian.net/browse/ENG-2154)
wgrant pushed a commit that referenced this pull request May 22, 2025
PR #42 added the check for expected periodic jobs to the worker health
check, but that doesn't actually help because it restarts the worker
process rather than the scheduler process. This creates a health check
for the scheduler and moves the periodic jobs check to that.

Fixes: [ENG-2154](https://stacklet.atlassian.net/browse/ENG-2154)
wgrant pushed a commit that referenced this pull request May 22, 2025
PR #42 added the check for expected periodic jobs to the worker health
check, but that doesn't actually help because it restarts the worker
process rather than the scheduler process. This creates a health check
for the scheduler and moves the periodic jobs check to that.

Fixes: [ENG-2154](https://stacklet.atlassian.net/browse/ENG-2154)
wgrant pushed a commit that referenced this pull request May 22, 2025
PR #42 added the check for expected periodic jobs to the worker health
check, but that doesn't actually help because it restarts the worker
process rather than the scheduler process. This creates a health check
for the scheduler and moves the periodic jobs check to that.

Fixes: [ENG-2154](https://stacklet.atlassian.net/browse/ENG-2154)
wgrant pushed a commit that referenced this pull request May 22, 2025
PR #42 added the check for expected periodic jobs to the worker health
check, but that doesn't actually help because it restarts the worker
process rather than the scheduler process. This creates a health check
for the scheduler and moves the periodic jobs check to that.

Fixes: [ENG-2154](https://stacklet.atlassian.net/browse/ENG-2154)
wgrant pushed a commit that referenced this pull request May 22, 2025
PR #42 added the check for expected periodic jobs to the worker health
check, but that doesn't actually help because it restarts the worker
process rather than the scheduler process. This creates a health check
for the scheduler and moves the periodic jobs check to that.

Fixes: [ENG-2154](https://stacklet.atlassian.net/browse/ENG-2154)
wgrant pushed a commit that referenced this pull request May 22, 2025
PR #42 added the check for expected periodic jobs to the worker health
check, but that doesn't actually help because it restarts the worker
process rather than the scheduler process. This creates a health check
for the scheduler and moves the periodic jobs check to that.

Fixes: [ENG-2154](https://stacklet.atlassian.net/browse/ENG-2154)
wgrant pushed a commit that referenced this pull request May 28, 2025
PR #42 added the check for expected periodic jobs to the worker health
check, but that doesn't actually help because it restarts the worker
process rather than the scheduler process. This creates a health check
for the scheduler and moves the periodic jobs check to that.

Fixes: [ENG-2154](https://stacklet.atlassian.net/browse/ENG-2154)
wgrant pushed a commit that referenced this pull request Jul 1, 2025
PR #42 added the check for expected periodic jobs to the worker health
check, but that doesn't actually help because it restarts the worker
process rather than the scheduler process. This creates a health check
for the scheduler and moves the periodic jobs check to that.

Fixes: [ENG-2154](https://stacklet.atlassian.net/browse/ENG-2154)
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.

2 participants