deployer/src/main.rs
2023-04-18 12:57:43 +02:00

27 lines
471 B
Rust

mod database;
mod error;
mod model;
mod worker;
use std::thread;
use std::time;
use database::init_database_pool;
use model::{Job, JobAction};
use worker::Manager;
fn main() {
init_database_pool();
let mut m: Manager<Job> = Manager::new("deploy");
m.launch_workers(5);
for i in 0..50 {
let job = Job::new(i, JobAction::MegaportDeploy);
m.add_runner(job);
}
let wait = time::Duration::from_secs(2);
thread::sleep(wait);
}