diff --git a/src/event/README b/src/event/README new file mode 100644 index 0000000..fa9df37 --- /dev/null +++ b/src/event/README @@ -0,0 +1,15 @@ +# Event + +Event stack. + +## Concour + +Event stack used in order to handle the concour event stack. + +### Action : CronJob + +Once every x time the ActixActox X CronJob should handle the trigger of scheduled concour event. + +- [Actix Actor](https://actix.rs/docs/actix/actor/) +- [JobScheduler exemple](https://github.com/mvniekerk/tokio-cron-scheduler/blob/main/examples/simple_job.rs) +- [JobSheduler exemple 2](https://github.com/mvniekerk/tokio-cron-scheduler/blob/main/examples/lib.rs) diff --git a/src/event/concour/mod.rs b/src/event/concour/mod.rs new file mode 100644 index 0000000..e69de29 diff --git a/src/event/mod.rs b/src/event/mod.rs new file mode 100644 index 0000000..20b5f63 --- /dev/null +++ b/src/event/mod.rs @@ -0,0 +1 @@ +pub mod concour; diff --git a/src/lib.rs b/src/lib.rs index f7b60fc..77782c0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2,5 +2,6 @@ pub mod api; pub mod botv2; pub mod config; pub mod db; +pub mod event; pub mod img; pub mod tracing; diff --git a/src/main.rs b/src/main.rs index 4e89c05..a310a87 100644 --- a/src/main.rs +++ b/src/main.rs @@ -15,7 +15,7 @@ use tracing_actix_web::{RequestId, TracingLogger}; use utoipa::OpenApi; use utoipa_swagger_ui::SwaggerUi; -#[tokio::main] // or #[actix_web::main] +#[actix_web::main] async fn main() -> std::io::Result<()> { let config = parse_local_config(); let port = config.port;