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: only call signal if executing on the main thread #10677

Merged
merged 2 commits into from
Aug 25, 2020

Conversation

henryyeh
Copy link
Contributor

@henryyeh henryyeh commented Aug 25, 2020

SUMMARY

Fixing Signal error that complains about signal only working in main thread.

ValueError: signal only works in main thread
File "superset/utils/core.py", line 624, in enter
signal.signal(signal.SIGALRM, self.handle_timeout)
File "signal.py", line 47, in signal
handler = _signal.signal(_enum_to_int(signalnum), _enum_to_int(handler))

signal only works in main thread

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TEST PLAN

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Requires DB Migration.
  • Confirm DB Migration upgrade and downgrade tested.
  • Introduces new feature or API
  • Removes existing feature or API

@henryyeh henryyeh closed this Aug 25, 2020
@henryyeh henryyeh reopened this Aug 25, 2020
@henryyeh henryyeh marked this pull request as ready for review August 25, 2020 22:12
@nytai nytai changed the title Henry/so 809 valueerror signal fix: only call signal if executing on the main thread Aug 25, 2020
@nytai nytai requested a review from craig-rueda August 25, 2020 23:37
@nytai
Copy link
Member

nytai commented Aug 25, 2020

For context, we're experiencing this error a lot at Preset since we're running on gunicorn with gthread.

@nytai nytai merged commit a6101f7 into apache:master Aug 25, 2020
@henryyeh henryyeh deleted the henry/SO-809-valueerror-signal branch August 27, 2020 20:46
@villebro villebro added the v0.38 label Sep 10, 2020
villebro pushed a commit to preset-io/superset that referenced this pull request Sep 11, 2020
Ofeknielsen pushed a commit to ofekisr/incubator-superset that referenced this pull request Oct 5, 2020
auxten pushed a commit to auxten/incubator-superset that referenced this pull request Nov 20, 2020
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.38.0 labels Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/XS v0.38 🚢 0.38.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants