-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 pickle error when attempting to pickle an application which contains websocket routes #1853
Fix pickle error when attempting to pickle an application which contains websocket routes #1853
Conversation
…ins websocket routes. Moves the websocket_handler subfunction out to a class-level method, which can be more easily pickled by the built-in python Pickler. Also includes a similar fix for the add_task deferred task scheduler subfunction.
Codecov Report
@@ Coverage Diff @@
## master #1853 +/- ##
==========================================
+ Coverage 91.63% 91.80% +0.16%
==========================================
Files 27 27
Lines 3000 3000
Branches 545 544 -1
==========================================
+ Hits 2749 2754 +5
+ Misses 172 169 -3
+ Partials 79 77 -2
Continue to review full report at Codecov.
|
@ahopkins just a heads up, I don't think the one line change in server.py was supposed to be part of this fix, it might've been an accidental inclusion. I'll double check. |
Revert change to multiprocessing mode accidentally included in #1853
Revert change to multiprocessing mode accidentally included in #1853 Co-authored-by: Adam Hopkins <[email protected]>
Revert change to multiprocessing mode accidentally included in #1853 Co-authored-by: Adam Hopkins <[email protected]>
This pull request has been mentioned on Sanic Community Discussion. There might be relevant details there: https://community.sanicframework.org/t/multiprocessing-is-currently-not-supported-on-nt/827/2 |
Similar fix to PR #1842, this fixes the same problem but for websocket routes.
Moves the
websocket_handler
subfunction out to a class-level method, which can be more easily pickled by the built-in python Pickler.Also includes a small addition of the same fix for the
app.add_task()
deferred task scheduler subfunction.