Skip to content
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

fix: prevent getting jobs when generation running #90

Merged
merged 2 commits into from
Mar 24, 2023
Merged

Conversation

MaikoTan
Copy link
Member

Description

fix #89

Type of changes

  • Bugfix

Please check the following items before submitting your pull request

  • I've checked that this isn't a duplicate pull request.
  • I've tested my changes with the latest SD-Webui version.
  • I've format my code with black: black .
  • I've lint my code with flake8: flake8 .
  • I've read the Contribution Guidelines
  • I've read the Code of Conduct

@MaikoTan MaikoTan enabled auto-merge March 23, 2023 02:21
@Maeyanie
Copy link
Contributor

Maeyanie commented Mar 23, 2023

I tested this and it appears to deadlock the instance when a poll happens. I'm guessing that's not a reentrant lock?

Testing on Win10, Python 3.10.8 from conda-forge.

Edit: Yeah, looking at the code, that lock is also acquired inside handle_request, which is inside that. Removing all 4 locks from handle_request (Which looks like they're unnecessary now that it's locked before calling that function? I don't know your code so not sure if it's called anywhere else.) seems to have fixed it.

@MaikoTan MaikoTan merged commit a3e67b5 into master Mar 24, 2023
@MaikoTan MaikoTan deleted the fix/issue-89 branch March 24, 2023 09:47
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.

[Feature]: Delay Horde poll when a non-Horde job is already running
2 participants