feat: Start research on Event Actix Actor

This commit is contained in:
Max batleforc 2024-06-21 17:23:54 +02:00
parent 259b6a14c3
commit 4082a1677d
No known key found for this signature in database
GPG Key ID: 25D243AB4B6AC9E7
5 changed files with 18 additions and 1 deletions

15
src/event/README Normal file
View File

@ -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)

0
src/event/concour/mod.rs Normal file
View File

1
src/event/mod.rs Normal file
View File

@ -0,0 +1 @@
pub mod concour;

View File

@ -2,5 +2,6 @@ pub mod api;
pub mod botv2; pub mod botv2;
pub mod config; pub mod config;
pub mod db; pub mod db;
pub mod event;
pub mod img; pub mod img;
pub mod tracing; pub mod tracing;

View File

@ -15,7 +15,7 @@ use tracing_actix_web::{RequestId, TracingLogger};
use utoipa::OpenApi; use utoipa::OpenApi;
use utoipa_swagger_ui::SwaggerUi; use utoipa_swagger_ui::SwaggerUi;
#[tokio::main] // or #[actix_web::main] #[actix_web::main]
async fn main() -> std::io::Result<()> { async fn main() -> std::io::Result<()> {
let config = parse_local_config(); let config = parse_local_config();
let port = config.port; let port = config.port;