- 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.
18 lines
506 B
GLSL
Executable File
18 lines
506 B
GLSL
Executable File
#!/usr/bin/env -S v -n -w -gc none -cc tcc -d use_openssl -enable-globals run
|
|
|
|
import freeflowuniverse.herolib.data.ourdb
|
|
|
|
worker_public_key := '46a9f9cee1ce98ef7478f3dea759589bbf6da9156533e63fed9f233640ac072c'
|
|
|
|
// Create a worker node with a unique database path
|
|
mut streamer := ourdb.new_streamer(
|
|
incremental_mode: false
|
|
server_port: 9000 // Use different port than master
|
|
is_worker: true
|
|
)!
|
|
|
|
streamer.add_worker(worker_public_key)!
|
|
|
|
// Initialize and run worker node
|
|
streamer.listen()!
|