Alex Mikhalev
4 years ago
14 changed files with 72 additions and 25 deletions
@ -0,0 +1,36 @@
@@ -0,0 +1,36 @@
|
||||
[package] |
||||
name = "sprinklers_actors" |
||||
version = "0.1.0" |
||||
authors = ["Alex Mikhalev <alexmikhalevalex@gmail.com>"] |
||||
edition = "2018" |
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html |
||||
|
||||
[dependencies] |
||||
sprinklers_core = { path = "../sprinklers_core" } |
||||
actix = { version = "0.10.0", default-features = false } |
||||
thiserror = "1.0.20" |
||||
tracing = "0.1.19" |
||||
chrono = { version = "0.4.15" } |
||||
serde = { version = "1.0.116", features = ["derive"] } |
||||
im = "15.0.0" |
||||
|
||||
[dependencies.tokio] |
||||
version = "0.2.22" |
||||
default-features = false |
||||
features = [] |
||||
|
||||
[dependencies.futures-util] |
||||
version = "0.3.5" |
||||
default-features = false |
||||
features = ["std", "async-await", "sink"] |
||||
|
||||
[dev-dependencies] |
||||
actix-rt = "1.1.1" |
||||
tokio = { version = "0.2.22", features = ["test-util"] } |
||||
assert_matches = "1.3.0" |
||||
|
||||
[dev-dependencies.tracing-subscriber] |
||||
version = "0.2.11" |
||||
default-features = false |
||||
features = ["registry"] |
@ -0,0 +1,8 @@
@@ -0,0 +1,8 @@
|
||||
pub mod program_runner; |
||||
pub mod section_runner; |
||||
|
||||
#[cfg(test)] |
||||
mod trace_listeners; |
||||
|
||||
pub use program_runner::ProgramRunner; |
||||
pub use section_runner::SectionRunner; |
@ -1,4 +1,4 @@
@@ -1,4 +1,4 @@
|
||||
use crate::section_runner::{SecRun, SecRunState, SecRunnerState}; |
||||
use sprinklers_actors::section_runner::{SecRun, SecRunState, SecRunnerState}; |
||||
use sprinklers_core::model::SectionId; |
||||
|
||||
use chrono::{DateTime, Utc}; |
@ -1,8 +1,9 @@
@@ -1,8 +1,9 @@
|
||||
use crate::{ |
||||
mqtt::MqttInterface, |
||||
use crate::mqtt::MqttInterface; |
||||
use sprinklers_actors::{ |
||||
program_runner::{ProgramEvent, ProgramEventRecv}, |
||||
section_runner::{SecRunnerState, SecRunnerStateRecv, SectionEvent, SectionEventRecv}, |
||||
}; |
||||
|
||||
use actix::{fut::wrap_future, Actor, ActorContext, Addr, AsyncContext, Handler, StreamHandler}; |
||||
use tokio::sync::broadcast; |
||||
use tracing::{trace, warn}; |
Loading…
Reference in new issue