mirror of
https://github.com/ComradCollective/Comrad
synced 2024-11-17 21:25:37 +00:00
wait maybe it is
This commit is contained in:
parent
de6739d9b9
commit
ceae6a4dca
17
p2p/api.py
17
p2p/api.py
@ -45,10 +45,10 @@ class Api(object):
|
|||||||
def __init__(self,app_storage):
|
def __init__(self,app_storage):
|
||||||
#self.connect()
|
#self.connect()
|
||||||
self.app_storage = app_storage
|
self.app_storage = app_storage
|
||||||
#self.node = self.connect()
|
# self.node = self.connect()
|
||||||
log('starting selfless daemon...')
|
log('starting selfless daemon...')
|
||||||
self.selfless = Thread(target=start_selfless_thread)
|
self.selfless = Thread(target=start_selfless_thread)
|
||||||
# self.selfless.daemon = True
|
self.selfless.daemon = True
|
||||||
self.selfless.start()
|
self.selfless.start()
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@ -70,14 +70,11 @@ class Api(object):
|
|||||||
from .kad import KadServer
|
from .kad import KadServer
|
||||||
|
|
||||||
async def _get():
|
async def _get():
|
||||||
if not hasattr(self,'node'):
|
node = KadServer() #storage=HalfForgetfulStorage())
|
||||||
self.node = node = KadServer() #storage=HalfForgetfulStorage())
|
await node.listen(PORT_LISTEN)
|
||||||
await node.listen(PORT_LISTEN)
|
await node.bootstrap(NODES_PRIME)
|
||||||
await node.bootstrap(NODES_PRIME)
|
# node=self.node
|
||||||
# node=self.node
|
|
||||||
else:
|
|
||||||
node = self.node
|
|
||||||
|
|
||||||
if type(key_or_keys) in {list,tuple,dict}:
|
if type(key_or_keys) in {list,tuple,dict}:
|
||||||
keys = key_or_keys
|
keys = key_or_keys
|
||||||
res = []
|
res = []
|
||||||
|
Loading…
Reference in New Issue
Block a user