Message387726
The client doesn't reconnect automatically, or explicitly. I just get BrokenPipeError over and over.
Manager:
import multiprocessing.managers, os, sys, time
class TestClass(object):
def test_method(self):
print("In test_method")
return "TEST"
class TestManager(multiprocessing.managers.BaseManager):
pass
address = ("127.0.0.1", 54321)
TestManager.register("Test", TestClass)
manager = TestManager(address = address, authkey = "1234".encode("utf-8"))
manager.get_server().serve_forever()
Client:
import multiprocessing.managers, os, sys, time
class TestManager(multiprocessing.managers.BaseManager):
pass
address = ("127.0.0.1", 54321)
TestManager.register("Test")
manager = TestManager(address = address, authkey = "1234".encode("utf-8"))
manager.connect()
test_class = manager.Test()
def call_it():
time.sleep(1)
result = test_class.test_method()
print("result: '" + str(type(result)) + ", " + str(result) + "'")
call_it()
print("Kill and restart the server and press return")
sys.stdin.readline()
error = False
while (True):
try:
if (error):
print("Reconnecting")
manager.connect()
test_class = manager.Test()
call_it()
error = False
except Exception as e:
print("Got exception " + str(type(e)) + ", " + repr(e))
error = True
time.sleep(1) |
|
Date |
User |
Action |
Args |
2021-02-26 14:31:42 | boom0192 | set | recipients:
+ boom0192 |
2021-02-26 14:31:42 | boom0192 | set | messageid: <1614349902.25.0.128405443976.issue43329@roundup.psfhosted.org> |
2021-02-26 14:31:42 | boom0192 | link | issue43329 messages |
2021-02-26 14:31:42 | boom0192 | create | |
|