mirror of
https://github.com/koush/scrypted.git
synced 2026-06-22 01:20:26 +01:00
Revert "server: watch for dangling python processes"
This reverts commit b29f2d5ee1.
This commit is contained in:
@@ -506,14 +506,9 @@ class PluginRemote:
|
||||
print('new fork')
|
||||
pluginFork.worker = multiprocessing.Process(target=plugin_fork, args=(child_conn,), daemon=True)
|
||||
pluginFork.worker.start()
|
||||
lastUpdate = time.time()
|
||||
|
||||
def schedule_exit_check():
|
||||
def exit_check():
|
||||
if time.time() - lastUpdate() > 60:
|
||||
print('fork worker is unresponsive, terminating')
|
||||
pluginFork.worker.kill()
|
||||
|
||||
if pluginFork.worker.exitcode != None:
|
||||
pluginFork.worker.join()
|
||||
else:
|
||||
@@ -528,8 +523,6 @@ class PluginRemote:
|
||||
forkPeer.peerName = 'thread'
|
||||
|
||||
async def updateStats(stats):
|
||||
nonlocal lastUpdate
|
||||
lastUpdate = time.time()
|
||||
self.ptimeSum += stats['cpu']['user']
|
||||
self.allMemoryStats[forkPeer] = stats
|
||||
forkPeer.params['updateStats'] = updateStats
|
||||
@@ -539,9 +532,8 @@ class PluginRemote:
|
||||
await readLoop()
|
||||
except:
|
||||
# traceback.print_exc()
|
||||
pass
|
||||
finally:
|
||||
print('fork read loop exited')
|
||||
finally:
|
||||
self.allMemoryStats.pop(forkPeer)
|
||||
parent_conn.close()
|
||||
rpcTransport.executor.shutdown()
|
||||
|
||||
Reference in New Issue
Block a user