Refactor home scripts to be wrappers around component scripts
- Simplified build.sh to call individual component build scripts - Refactored run.sh to call component run scripts with live log display - Each service gets color-coded prefix ([SUPER], [OSIRS], [COORD]) - Run script keeps running and displays interleaved logs from all services - Added proper signal handling for graceful shutdown of all services - Updated README with new architecture and usage examples
This commit is contained in:
BIN
logs/coordinator.log
Normal file
BIN
logs/coordinator.log
Normal file
Binary file not shown.
1229
logs/osiris_runner.log
Normal file
1229
logs/osiris_runner.log
Normal file
File diff suppressed because it is too large
Load Diff
126
logs/supervisor.log
Normal file
126
logs/supervisor.log
Normal file
@@ -0,0 +1,126 @@
|
||||
Building Hero Supervisor...
|
||||
Compiling hero-supervisor v0.1.0 (/Users/timurgordon/code/git.ourworld.tf/herocode/supervisor)
|
||||
warning: unused imports: `ClientBuilder` and `Client`
|
||||
--> src/job.rs:3:23
|
||||
|
|
||||
3 | use hero_job_client::{Client, ClientBuilder};
|
||||
| ^^^^^^ ^^^^^^^^^^^^^
|
||||
|
|
||||
= note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default
|
||||
|
||||
warning: unused doc comment
|
||||
--> src/openrpc.rs:252:1
|
||||
|
|
||||
252 | /// Thread-local storage for the current request's API key
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ rustdoc does not generate documentation for macro invocations
|
||||
|
|
||||
= help: to document an item produced by a macro, the macro must produce the documentation as part of its expansion
|
||||
= note: `#[warn(unused_doc_comments)]` (part of `#[warn(unused)]`) on by default
|
||||
|
||||
warning: unused import: `crate::runner::Runner`
|
||||
--> src/services.rs:9:5
|
||||
|
|
||||
9 | use crate::runner::Runner;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
warning: unused imports: `ClientBuilder` and `Client`
|
||||
--> src/lib.rs:21:23
|
||||
|
|
||||
21 | use hero_job_client::{Client, ClientBuilder};
|
||||
| ^^^^^^ ^^^^^^^^^^^^^
|
||||
|
||||
warning: variable does not need to be mutable
|
||||
--> src/supervisor.rs:481:17
|
||||
|
|
||||
481 | let mut pm = self.process_manager.lock().await;
|
||||
| ----^^
|
||||
| |
|
||||
| help: remove this `mut`
|
||||
|
|
||||
= note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default
|
||||
|
||||
warning: unused variable: `force`
|
||||
--> src/supervisor.rs:494:57
|
||||
|
|
||||
494 | pub async fn stop_runner(&mut self, actor_id: &str, force: bool) -> RunnerResult<()> {
|
||||
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_force`
|
||||
|
|
||||
= note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default
|
||||
|
||||
warning: variable does not need to be mutable
|
||||
--> src/supervisor.rs:500:17
|
||||
|
|
||||
500 | let mut pm = self.process_manager.lock().await;
|
||||
| ----^^
|
||||
| |
|
||||
| help: remove this `mut`
|
||||
|
||||
warning: unused variable: `lines`
|
||||
--> src/supervisor.rs:529:9
|
||||
|
|
||||
529 | lines: Option<usize>,
|
||||
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_lines`
|
||||
|
||||
warning: unused variable: `follow`
|
||||
--> src/supervisor.rs:530:9
|
||||
|
|
||||
530 | follow: bool,
|
||||
| ^^^^^^ help: if this is intentional, prefix it with an underscore: `_follow`
|
||||
|
||||
warning: field `session_name` is never read
|
||||
--> src/supervisor.rs:43:5
|
||||
|
|
||||
42 | struct TmuxProcessManager {
|
||||
| ------------------ field in this struct
|
||||
43 | session_name: String,
|
||||
| ^^^^^^^^^^^^
|
||||
|
|
||||
= note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default
|
||||
|
||||
warning: function `invalid_params_error` is never used
|
||||
--> src/openrpc.rs:63:4
|
||||
|
|
||||
63 | fn invalid_params_error(msg: &str) -> ErrorObject<'static> {
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
warning: function `parse_process_manager_type` is never used
|
||||
--> src/openrpc.rs:483:4
|
||||
|
|
||||
483 | fn parse_process_manager_type(pm_type: &str, session_name: Option<String>) -> Result<ProcessManagerType, ErrorObject<'static>> {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
warning: `hero-supervisor` (lib) generated 12 warnings (run `cargo fix --lib -p hero-supervisor` to apply 5 suggestions)
|
||||
Finished `release` profile [optimized] target(s) in 25.90s
|
||||
warning: the following packages contain code that will be rejected by a future version of Rust: redis v0.25.4
|
||||
note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 2`
|
||||
✅ Hero Supervisor built successfully
|
||||
Starting Hero Supervisor...
|
||||
[2025-11-04T15:43:17Z INFO supervisor] Starting Hero Supervisor
|
||||
[2025-11-04T15:43:17Z INFO supervisor] Using CLI configuration
|
||||
[2025-11-04T15:43:17Z INFO supervisor] Bootstrapping admin API key: admin
|
||||
|
||||
╔════════════════════════════════════════════════════════════╗
|
||||
║ 🔑 Admin API Key Created ║
|
||||
╚════════════════════════════════════════════════════════════╝
|
||||
Name: admin
|
||||
Key: 803d2cc3-efae-400c-a183-997ad35cbd85
|
||||
Scope: admin
|
||||
⚠️ SAVE THIS KEY - IT WILL NOT BE SHOWN AGAIN!
|
||||
╚════════════════════════════════════════════════════════════╝
|
||||
|
||||
|
||||
╔════════════════════════════════════════════════════════════╗
|
||||
║ Hero Supervisor Started ║
|
||||
╚════════════════════════════════════════════════════════════╝
|
||||
📡 OpenRPC Server: http://127.0.0.1:3030
|
||||
🔗 Redis: redis://localhost:6379
|
||||
🌐 Mycelium: Not compiled (use --features mycelium)
|
||||
╚════════════════════════════════════════════════════════════╝
|
||||
|
||||
[2025-11-04T15:43:17Z INFO supervisor] Starting OpenRPC server on 127.0.0.1:3030
|
||||
[2025-11-04T15:43:17Z ERROR supervisor] OpenRPC server error: Address already in use (os error 48)
|
||||
[2025-11-04T15:43:17Z INFO hero_supervisor::app] Starting Hero Supervisor Application
|
||||
[2025-11-04T15:43:17Z INFO hero_supervisor::app] Starting all runners
|
||||
[2025-11-04T15:43:17Z INFO hero_supervisor::app] All runners started successfully
|
||||
[2025-11-04T15:43:17Z INFO hero_supervisor::app] Mycelium integration not enabled (compile with --features mycelium)
|
||||
[2025-11-04T15:43:17Z INFO hero_supervisor::app] Supervisor is running. Press Ctrl+C to shutdown.
|
||||
Reference in New Issue
Block a user