From b9c35b34da0808850e14bc01f45c05cf60017dfb Mon Sep 17 00:00:00 2001 From: mmurdoch Date: Fri, 24 Apr 2015 19:59:49 +0100 Subject: [PATCH] Remove use of multiprocessing to fix #54 --- datasift/client.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/datasift/client.py b/datasift/client.py index e80a42f..ee46c24 100644 --- a/datasift/client.py +++ b/datasift/client.py @@ -1,7 +1,6 @@ import sys import json -from multiprocessing import Process from twisted.internet import reactor from autobahn.twisted.websocket import WebSocketClientFactory, connectWS @@ -82,7 +81,6 @@ def __init__(self, user, apikey, ssl=True, proxies=None, timeout=None, verify=No WEBSOCKET_HOST, urlencode(dict(username=config.user, api_key=config.key))) self.factory = LiveStreamFactory(host, debug=False, useragent=USER_AGENT) - self._stream_process = Process(target=self._stream) self._stream_process_started = False def start_stream_subscriber(self): @@ -91,11 +89,8 @@ def start_stream_subscriber(self): Called when the stream consumer has been set up with the correct callbacks. """ if not self._stream_process_started: # pragma: no cover - if sys.platform.startswith("win"): # if we're on windows we can't expect multiprocessing to work - self._stream_process_started = True - self._stream() self._stream_process_started = True - self._stream_process.start() + self._stream() def subscribe(self, stream): """ Subscribe to a stream.