feat: split out the minecraft script so it runs at 5am instead of regularly
This commit is contained in:
parent
7e6d892b67
commit
cf2c7683d2
4 changed files with 20 additions and 8 deletions
14
src/bin/update_minecraft.rs
Normal file
14
src/bin/update_minecraft.rs
Normal file
|
@ -0,0 +1,14 @@
|
|||
use skynet_discord_bot::{db_init, get_config, get_server_config_bulk, update_server};
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() {
|
||||
let config = get_config();
|
||||
let db = match db_init(&config).await {
|
||||
Ok(x) => x,
|
||||
Err(_) => return,
|
||||
};
|
||||
|
||||
for server_config in get_server_config_bulk(&db).await {
|
||||
update_server(server_config.server_minecraft, &db, &server_config.server, &config).await;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue