Skip to content

Commit 5f2da89

Browse files
committed
Removed gevent from socket handler and monkey patcher
1 parent 021bf3a commit 5f2da89

File tree

2 files changed

+3
-20
lines changed

2 files changed

+3
-20
lines changed

src/labthings/default_views/sockets.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from ..sockets import SocketSubscriber
22
from ..find import current_thing
33

4-
import gevent
54
import logging
65

76

@@ -21,7 +20,6 @@ def socket_handler(ws):
2120
response = process_socket_message(message)
2221
if response:
2322
ws.send(response)
24-
gevent.sleep(0.1)
2523
# Remove the subscriber once the loop returns
2624
current_thing.subscribers.remove(wssub)
2725
logging.info(f"Removed subscriber {wssub}")

src/labthings/monkey.py

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,3 @@
1-
from gevent.monkey import patch_all
2-
3-
__all__ = ["patch_all"]
4-
5-
"""
6-
NOTE: THIS FILE IS EXCLUDED FROM OUR UNIT TESTS.
7-
8-
MONKEY PATCHING IN THE MIDDLE OF A TEST SUITE RUNNING
9-
MAY CAUSE PROBLEMS.
10-
11-
GIVEN THAT THIS MODULE IS SIMPLY A PROXY FOR GEVENTS
12-
MONKEY PATCHER, TESTSING IS FAIRLY REDUNDANT ANYWAY.
13-
14-
THIS SHOULD BE PERIODICALLY REVISITED TO MAKE SURE ITS
15-
STILL TRUE.
16-
17-
THANKS
18-
"""
1+
def patch_all(*args, **kwargs):
2+
# Here for backwards compatibility
3+
return

0 commit comments

Comments
 (0)