Skip to content

Commit df19210

Browse files
committed
Merge remote-tracking branch 'origin/main' into feature/trustworthiness
2 parents 2bf2b0d + 5988625 commit df19210

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

nebula/controller.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class NebulaEventHandler(PatternMatchingEventHandler):
6767
def __init__(self):
6868
super(NebulaEventHandler, self).__init__()
6969
self.last_processed = {}
70-
self.timeout_ns = 10 * 1e9
70+
self.timeout_ns = 5 * 1e9
7171
self.processing_files = set()
7272
self.lock = threading.Lock()
7373

nebula/core/network/connection.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ async def reconnect(self, max_retries: int = 5, delay: int = 5) -> None:
171171
except Exception as e:
172172
logging.error(f"Reconnection attempt {attempt + 1} failed: {e}")
173173
await asyncio.sleep(delay)
174-
logging.error(f"Failed to reconnect to {self.addr} after {max_retries} attempts")
174+
logging.error(f"Failed to reconnect to {self.addr} after {max_retries} attempts. Stopping connection...")
175175
await self.stop()
176176

177177
async def send(self, data: Any, pb: bool = True, encoding_type: str = "utf-8", is_compressed: bool = False) -> None:
@@ -194,7 +194,7 @@ async def send(self, data: Any, pb: bool = True, encoding_type: str = "utf-8", i
194194
await self._send_chunks(message_id, data_to_send)
195195
except Exception as e:
196196
logging.error(f"Error sending data: {e}")
197-
await self.stop()
197+
await self.reconnect()
198198

199199
def _prepare_data(self, data: Any, pb: bool, encoding_type: str) -> tuple[bytes, bytes]:
200200
if pb:
@@ -267,8 +267,6 @@ async def handle_incoming_message(self) -> None:
267267
await self.reconnect()
268268
except Exception as e:
269269
logging.error(f"Error handling incoming message: {e}")
270-
finally:
271-
await self.stop()
272270

273271
async def _read_exactly(self, num_bytes: int, max_retries: int = 3) -> bytes:
274272
data = b""

nebula/frontend/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1161,7 +1161,7 @@ async def run_scenarios(data, role):
11611161
trust_metric_manager = TrustMetricManager(scenario[1])
11621162
trust_metric_manager.evaluate(scenario, weights, use_weights=True)
11631163

1164-
await asyncio.sleep(1)
1164+
await asyncio.sleep(5)
11651165

11661166

11671167
@app.post("/nebula/dashboard/deployment/run")

0 commit comments

Comments
 (0)