consider to use https://crates.io/crates/config instead of current configuration?
i think it’s done
“` let app_state = AppState { sqlite: Arc::new(sqlite), }; let router = axum::Router::new() .route(“/authors”, post(create_author)) .layer(trace_layer) .with_state(app_state); “`
- [ ] coverage
- [X] tests/clippy/check/fmt
- [ ] integration tests (require only redis now)
- [X] internet
- [ ] proxy with httpbin
- [ ] optional redis
- [ ] optional mongodb
- [ ] optional postgres
- [ ] adjust async tests to [tokio::test] and drop initialization of async runtime in code
- [ ] expose http endpoint with json collected basic stats from workers
- [ ] shared context for Computation. way to transform &Worker to SharedContext
- [ ] add storage error types context error types to TaskProcessorError
- [X] better task handling in executor, queue, started, finished and TaskStatus enum
- [ ] add queued time, make started time optional (should be something when execution is started)
- [ ] drop task exceed time for execution
- [ ] separate thread to clean up staled tasks (or find the way how to not make them stalled)
- [ ] add more tests
- [-] TaskProcessor::process should not panic? (ugh it’s complicated to apply catch_unwind to async function)
- [ ] Use tokio per core executor to make tasks Sync maybe? if possible
- [X] i think need to remove unnecessary workspaces
- [ ] fix tests sometimes not drop database keys
Need something to manager workers. I think worker should return anyhow:Result<ComputationResult> and if Computation failed manager run worker again. Also there can be thread somewhere which will run another worker instead of failed.
Worker should have bi-directional channels to communicate with nodes and channel to accept termination signal. add Anyhow::Error for worker run Manager should collect stats about workers
- [X] worker sleep timeout - make it std::time::Duration
- [X] computation function should return anyhow::Error
- [ ] computation could be paused and resumed
- [ ] Probably i need to Box list and hashmap since they could grow large and quickly overflow the stack
- [X] task_deport -> storage
- [X] task_executor -> manager