Skip to content

fix: handle power monitor events to manage scheduler lifecycle #207

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 7, 2025

Conversation

SRWieZ
Copy link
Member

@SRWieZ SRWieZ commented Apr 6, 2025

Fixes: NativePHP/laravel#542

Getting a Bad File Descriptor Error after the app is resumed from sleep for every scheduler run.

Laravel scheduler improvement:

  • Imported powerMonitor module from electron
  • Added event listeners for suspend and resume events to manage scheduler state
  • Introduced a stopScheduler method to clear and reset the scheduler interval

@SRWieZ SRWieZ marked this pull request as ready for review April 7, 2025 13:52
@SRWieZ
Copy link
Member Author

SRWieZ commented Apr 7, 2025

This seems like it has fixed my problem.

I don't think it's a breaking change. When the computer goes to sleep, the scheduler wasn't run anyway.

@PeteBishwhip PeteBishwhip merged commit 5b7257c into main Apr 7, 2025
@PeteBishwhip PeteBishwhip deleted the fix-issue-542 branch April 7, 2025 14:05
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.

Scheduler emit a javascript error in production build
3 participants