koi-net 1.0.0b7__py3-none-any.whl → 1.0.0b8__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- koi_net/network/interface.py +2 -2
- koi_net/network/response_handler.py +1 -1
- koi_net/protocol/api_models.py +1 -1
- {koi_net-1.0.0b7.dist-info → koi_net-1.0.0b8.dist-info}/METADATA +4 -5
- {koi_net-1.0.0b7.dist-info → koi_net-1.0.0b8.dist-info}/RECORD +7 -7
- {koi_net-1.0.0b7.dist-info → koi_net-1.0.0b8.dist-info}/WHEEL +0 -0
- {koi_net-1.0.0b7.dist-info → koi_net-1.0.0b8.dist-info}/licenses/LICENSE +0 -0
koi_net/network/interface.py
CHANGED
|
@@ -201,8 +201,8 @@ class NetworkInterface:
|
|
|
201
201
|
payload = self.request_handler.fetch_bundles(
|
|
202
202
|
node=node_rid, rids=[rid])
|
|
203
203
|
|
|
204
|
-
if payload.
|
|
205
|
-
remote_bundle = payload.
|
|
204
|
+
if payload.bundles:
|
|
205
|
+
remote_bundle = payload.bundles[0]
|
|
206
206
|
logger.info(f"Got bundle from '{node_rid}'")
|
|
207
207
|
break
|
|
208
208
|
|
koi_net/protocol/api_models.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: koi-net
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.0b8
|
|
4
4
|
Summary: Implementation of KOI-net protocol in Python
|
|
5
5
|
Project-URL: Homepage, https://github.com/BlockScience/koi-net/
|
|
6
6
|
Author-email: Luke Miller <luke@block.science>
|
|
@@ -144,7 +144,8 @@ node = NodeInterface(
|
|
|
144
144
|
event=[],
|
|
145
145
|
state=[]
|
|
146
146
|
)
|
|
147
|
-
)
|
|
147
|
+
),
|
|
148
|
+
use_kobj_processor_thread=True
|
|
148
149
|
)
|
|
149
150
|
```
|
|
150
151
|
|
|
@@ -196,11 +197,9 @@ from koi_net.protocol.api_models import *
|
|
|
196
197
|
from koi_net.protocol.consts import *
|
|
197
198
|
|
|
198
199
|
@app.post(BROADCAST_EVENTS_PATH)
|
|
199
|
-
def broadcast_events(req: EventsPayload
|
|
200
|
+
def broadcast_events(req: EventsPayload):
|
|
200
201
|
for event in req.events:
|
|
201
202
|
node.processor.handle(event=event, source=KnowledgeSource.External)
|
|
202
|
-
|
|
203
|
-
background.add_task(node.processor.flush_kobj_queue)
|
|
204
203
|
```
|
|
205
204
|
|
|
206
205
|
Next we can add the event polling endpoint, this allows partial nodes to receive events from us.
|
|
@@ -3,22 +3,22 @@ koi_net/core.py,sha256=dE4sE2qsoIRUU1zsnrjx7aqYtYdHyCx-Dv4cwbkRjy4,4613
|
|
|
3
3
|
koi_net/identity.py,sha256=PBgmAx5f3zzQmHASB1TJW2g19n9TLfmSJMXg2eQFg0A,2386
|
|
4
4
|
koi_net/network/__init__.py,sha256=r_RN-q_mDYC-2RAkN-lJoMUX76TXyfEUc_MVKW87z0g,39
|
|
5
5
|
koi_net/network/graph.py,sha256=KMUCU3AweRvivwy7GuWgX2zX74FPgHeVMO5ydvhVyvA,4833
|
|
6
|
-
koi_net/network/interface.py,sha256=
|
|
6
|
+
koi_net/network/interface.py,sha256=4JTeg8Eah0z5YKhcVKJbCVZw_Ghl_6xfG8aa1I5PCWI,10643
|
|
7
7
|
koi_net/network/request_handler.py,sha256=fhuCDsxI8fZ4p5TntcTZR4mnLrLQ61zDy7Oca3ooFCE,4402
|
|
8
|
-
koi_net/network/response_handler.py,sha256=
|
|
8
|
+
koi_net/network/response_handler.py,sha256=HaP8Fl0bp_lfMmevhdVY8s9o0Uf8CR1ZaW5g3jsX8gw,1888
|
|
9
9
|
koi_net/processor/__init__.py,sha256=x4fAY0hvQEDcpfdTB3POIzxBQjYAtn0qQazPo1Xm0m4,41
|
|
10
10
|
koi_net/processor/default_handlers.py,sha256=Yc7a9n5sAOYMHzzY59VMXYOxQL-6O9zbMQzd61XbIEs,7184
|
|
11
11
|
koi_net/processor/handler.py,sha256=APCECwU7MFcgP7Vu6UTngs0XIjaXSQ_f8rqy8cH5_rM,2242
|
|
12
12
|
koi_net/processor/interface.py,sha256=szLLeDfMgeqU35F2na-LvzytJ0irpCtR9g0empo4JoI,12169
|
|
13
13
|
koi_net/processor/knowledge_object.py,sha256=cGv33fwNZQMylkhlTaQTbk96FVIVbdOUaBsG06u0m4k,4187
|
|
14
14
|
koi_net/protocol/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
15
|
-
koi_net/protocol/api_models.py,sha256=
|
|
15
|
+
koi_net/protocol/api_models.py,sha256=RDwVHAahiWzwzUnlj5MIm9et5WVpQOaG-Uscv1B9coU,1116
|
|
16
16
|
koi_net/protocol/consts.py,sha256=zeWJvRpqcERrqJq39heyNHb6f_9QrvoBZJHd70yE914,249
|
|
17
17
|
koi_net/protocol/edge.py,sha256=G3D9Ie0vbTSMJdoTw9g_oBmFCqzJ1gO7U1PVrw7p3j8,447
|
|
18
18
|
koi_net/protocol/event.py,sha256=dzJmcHbimo7p5NwH2drccF0vMcAj9oQRj3iZ9Bjf7kg,1275
|
|
19
19
|
koi_net/protocol/helpers.py,sha256=9E9PaoIuSNrTBATGCLJ_kSBMZ2z-KIMnLJzGOTqQDC0,719
|
|
20
20
|
koi_net/protocol/node.py,sha256=Ntrx01dbm39ViKGtr4gLmztcMwKpTIweS6rRL-zoU_Y,391
|
|
21
|
-
koi_net-1.0.
|
|
22
|
-
koi_net-1.0.
|
|
23
|
-
koi_net-1.0.
|
|
24
|
-
koi_net-1.0.
|
|
21
|
+
koi_net-1.0.0b8.dist-info/METADATA,sha256=-oGUkUtRG4biV7yo7WIl2XiDv4k8wVTV_DbyebOiuoI,21352
|
|
22
|
+
koi_net-1.0.0b8.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
23
|
+
koi_net-1.0.0b8.dist-info/licenses/LICENSE,sha256=XBcvl8yjCAezfuqN1jadQykrX7H2g4nr2WRDmHLW6ik,1090
|
|
24
|
+
koi_net-1.0.0b8.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|