feat: Improve MyceliumStreamer worker communication

- Add worker registration to MyceliumStreamer:  Allows for explicit
  addition of workers, improving management and control.
- Simplify worker message handling: Streamlines message processing
  for increased efficiency and readability.  Removes unnecessary
  logging and simplifies message routing.
- Remove redundant message handling: Eliminates duplicate code
  paths for cleaner and more maintainable code.
- Improve worker data retrieval: Facilitates direct data retrieval
  from workers, enhancing efficiency and reliability.
This commit is contained in:
Mahmoud Emad
2025-03-04 00:40:05 +02:00
parent 5b69f935a5
commit 485b47d145
3 changed files with 21 additions and 58 deletions

View File

@@ -11,5 +11,7 @@ mut streamer := ourdb.new_streamer(
is_worker: true
)!
streamer.add_worker(worker_public_key)!
// Initialize and run worker node
streamer.listen()!