Skip to content

Conversation

jeremy
Copy link
Member

@jeremy jeremy commented May 7, 2025

e.g. due to sleep/wake in a dev app

Fixes #430

@jeremy jeremy requested a review from rosa May 7, 2025 16:41
Copy link
Member Author

@jeremy jeremy left a comment

Choose a reason for hiding this comment

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

Not happy with this fix since 1. it may be a work-around masking that supervisor process pruning should be resilient to sleep/resume interference and 2. the test case is synthetic at best, but perhaps it's a useful starting point.

def wait_for_failed_executions(count, timeout: 1.second)
wait_for(timeout: timeout) { SolidQueue::FailedExecution.count == count }
end
end
Copy link
Member Author

Choose a reason for hiding this comment

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

This test isn't strictly necessary. I was using it to guide debugging and understanding.


supervisor = SolidQueue::Supervisor.allocate

supervisor.send(:handle_claimed_jobs_by, terminated_fork, status)
Copy link
Member Author

Choose a reason for hiding this comment

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

This test is terribly synthetic, I'm afraid. Just explicitly constructs the situation that's encountered in the wild (nil Supervisor#process) rather than realistically (actually pruning the process).

@jeremy jeremy force-pushed the supervisor-sleep-wake-in-dev branch 2 times, most recently from 055cb3a to 849dcfd Compare May 7, 2025 16:48
@rosa rosa force-pushed the supervisor-sleep-wake-in-dev branch from 849dcfd to e74e695 Compare June 13, 2025 13:14
@rosa rosa merged commit 9f12681 into rails:main Jun 13, 2025
67 of 86 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants